Cancel a subscription
Cancels a subscription. The request body is required and routes between two flows: cancel_immediately transitions the subscription to cancelled right away; schedule_cancellation marks it for cancellation at the next billing date / current period end.
The response is the updated subscription with plan, customer, and organization relations expanded.
Authorizations
Authentication header of the form api key, where api key is your organization api key.
Headers
Specifies the version of the API to use
2.0.0 Path Parameters
Subscription ID
Body
Cancellation strategy.
Request body for POST /subscriptions/cancel/{id} on API version 2.0.0+. Routes between immediate and scheduled cancellation.
Cancellation strategy. cancel_immediately transitions the subscription to cancelled right away. schedule_cancellation marks it for cancellation at the next billing date / current period end (idempotent if a scheduled cancellation already exists).
cancel_immediately, schedule_cancellation "cancel_immediately"
Response
Returns the subscription object with status set to cancelled.
Unique identifier for the subscription
"sub_123e4567-e89b-12d3-a456-426614174000"
Next scheduled billing date for the subscription
"2025-06-26T12:00:00Z"
Information about past due attempts
Current status of the subscription
trial, active, past_due, cancelled, scheduled_for_cancellation Custom metadata associated with the subscription A dictionary of key-value pairs.
{ "key": "value" }The date and time at which the subscription was created in UTC format
"2025-05-26T10:00:00Z"
The date and time of the last subscription update in UTC format
"2025-05-27T10:00:00Z"