Subscriptions
Cancel a subscription
Ends a subscription at the end of the current period, so the customer keeps the access they have already paid for.
POST/v1/subscriptions/{subscription_id}/cancel
Parameters
| Parameter | Description |
|---|---|
| subscription_idstring · pathrequired | No description in the spec. |
Returns
The subscription with cancel_at_period_end set. Cancellation is always at the period boundary; there is no immediate-termination variant.
Until that boundary passes the customer is still on a live subscription and can change their mind: reactivate clears the pending cancellation with no new checkout. Cancelling an already-cancelling subscription returns the unchanged row, so a retried call converges on one state.
Test it
Cancel in a sandbox, then advance the test clock past current_period_end and watch the status settle to canceled with no further invoice.
Errors
| Status | Cause |
|---|---|
| 401 | Missing or invalid API key. |
| 403 | Key is missing the subscriptions:cancel scope. |
| 404 | No such object, or it belongs to the other mode. |
| 422 | Validation Error |
| 429 | Rate limited. Back off and retry. |
Other subscriptions operations
- List subscriptions GET /v1/subscriptions
- Retrieve a subscription GET /v1/subscriptions/{subscription_id}
- Pause subscription POST /v1/subscriptions/{subscription_id}/pause
- Preview update subscription POST /v1/subscriptions/{subscription_id}/preview_update
- Reactivate subscription POST /v1/subscriptions/{subscription_id}/reactivate
- Reauthorize payment method POST /v1/subscriptions/{subscription_id}/reauthorize_payment_method
- Resume subscription POST /v1/subscriptions/{subscription_id}/resume
- Change a subscription's plan POST /v1/subscriptions/{subscription_id}/update
BillKit