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

StatusCodeMeaning
400BAD_REQUESTThe id is not a UUID.
401Missing or invalid API key.
403The key does not hold billing:write.
404NOT_FOUNDThe organisation is not in this key's scope.
404SUBSCRIPTION_NOT_FOUNDThe organisation has no live subscription.
409SUBSCRIPTION_NOT_CANCELLABLEThe 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.
502CHECKOUT_GATEWAY_REJECTEDStripe refused the request. Do not retry.
503CHECKOUT_UPSTREAM_ERRORfm-api could not reach Stripe, or Stripe rate-limited the call. Retry.
503CHECKOUT_NOT_CONFIGUREDThis deployment has no Stripe gateway.

Required scope: billing:write