curl --request PUT \
--url https://api.getcargo.io/v1/billing/subscription/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"creditsCount": 123,
"cadence": "monthly"
}
'{
"subscription": {
"uuid": "<string>",
"workspaceUuid": "<string>",
"provider": "stripe",
"customerOrbId": "<string>",
"customerStripeId": "<string>",
"subscriptionStatus": "<string>",
"subscriptionStripeId": "<string>",
"subscriptionAvailableCreditsCount": 123,
"subscriptionCreditsUsedCount": 123,
"additionalAvailableCreditsCount": 123,
"hasCredits": true,
"creditsOverageBehaviors": [
{
"unit": "billing.credits",
"action": "deny"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"plan": "self-serve",
"cadence": "monthly",
"fixedPrice": 123,
"conversionRate": 123,
"startAt": "<string>",
"resetAt": "<string>",
"endAt": "<string>",
"hasPendingChange": true,
"futureChange": {
"cadence": "monthly",
"fixedPrice": 123,
"creditsCount": 123,
"conversionRate": 123,
"startAt": "<string>",
"endAt": "<string>"
},
"topup": {
"creditsCount": 123,
"threshold": 123
}
}
}Update the subscription plan
curl --request PUT \
--url https://api.getcargo.io/v1/billing/subscription/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"creditsCount": 123,
"cadence": "monthly"
}
'{
"subscription": {
"uuid": "<string>",
"workspaceUuid": "<string>",
"provider": "stripe",
"customerOrbId": "<string>",
"customerStripeId": "<string>",
"subscriptionStatus": "<string>",
"subscriptionStripeId": "<string>",
"subscriptionAvailableCreditsCount": 123,
"subscriptionCreditsUsedCount": 123,
"additionalAvailableCreditsCount": 123,
"hasCredits": true,
"creditsOverageBehaviors": [
{
"unit": "billing.credits",
"action": "deny"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"plan": "self-serve",
"cadence": "monthly",
"fixedPrice": 123,
"conversionRate": 123,
"startAt": "<string>",
"resetAt": "<string>",
"endAt": "<string>",
"hasPendingChange": true,
"futureChange": {
"cadence": "monthly",
"fixedPrice": 123,
"creditsCount": 123,
"conversionRate": 123,
"startAt": "<string>",
"endAt": "<string>"
},
"topup": {
"creditsCount": 123,
"threshold": 123
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful response
Updated subscription details.
Show child attributes
Was this page helpful?