Cancel Subscription
Cancel an organisation's subscription at the end of the paid period.
โถWhat this does
This call tells Stripe to stop the subscription at current_period_end.
Stripe does not bill the renewal. The subscription stays active until
then, and the organisation keeps its plan allowance until then.
The call never cancels immediately. To undo it before the period ends, call
POST /organizations/:id/subscription/resume.
The response shows the new state at once. You do not need to call
GET /organizations/:id/subscription again.
โถCredits do not change
This call does not change the credit balance, the credit ledger or the plan allowance. At the period end the plan allowance stops. Credits in the balance stay.
โถRepeat calls are safe
A second call returns 200 with the same state.
โถErrors
| Status | Code | Meaning |
|---|---|---|
| 400 | BAD_REQUEST | The id is not a UUID. |
| 401 | Missing or invalid API key. | |
| 403 | The key does not hold billing:write. | |
| 404 | NOT_FOUND | The organisation is not in this key's scope. |
| 404 | SUBSCRIPTION_NOT_FOUND | The organisation has no live subscription. |
| 409 | SUBSCRIPTION_NOT_CANCELLABLE | The subscription is pending or incomplete, has no Stripe subscription yet, is a negotiated plan, or Stripe reports a status that is not live. details.status names it; a negotiated plan also carries details.plan_key. |
| 502 | CHECKOUT_GATEWAY_REJECTED | Stripe refused the request. Do not retry. |
| 503 | CHECKOUT_UPSTREAM_ERROR | fm-api could not reach Stripe, or Stripe rate-limited the call. Retry. |
| 503 | CHECKOUT_NOT_CONFIGURED | This deployment has no Stripe gateway. |
Required scope:
billing:write