Update an organization's billing
Changes the plan, schedules or undoes the subscription's cancellation at the period's end, or sets the spend cap, and returns the billing.
The changes apply in that order, and repeating a request is safe. A plan change moves an active Stripe subscription immediately; to subscribe for the first time, create a checkout session.
Guide: Plans and billing
Errors
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request | plan_unavailable | For a planVersionId not in availablePlans. |
| 400 | invalid_request | spend_cap_below_base_price | For a cap under the plan's base price. |
| 409 | conflict | plan_change_conflict | While the plan cannot change now, such as without a Stripe subscription or during another change. |
| 409 | conflict | no_stripe_subscription | When there is no Stripe subscription to cancel or resume. |
| 409 | conflict | spend_cap_unavailable | When the plan has no usage pricing to cap. |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Billing
Something wrong or missing on this page? Tell us by email or on Discord.