Subscriptions
Cancel a subscription
Cancels an active subscription.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*string
Request Body
application/json
Cancel subscription payload.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/subscriptions/sub_IhMUl3rrZ3/cancel" \ -H "Content-Type: application/json" \ -d '{}'{
"subscription": {
"object": "subscription",
"id": "sub_IhMUl3rrZ3",
"status": "active",
"account_id": "acc_IhMUl3rrZ3",
"plan_id": "pln_IhMUl3rrZ3",
"payment_method_id": "pme_IhMUl3rrZ3",
"currency": "USD",
"billing_cycle_type": "anniversary",
"collection_method": "automatic",
"current_period_start": "2025-02-14T17:33:40.843Z",
"current_period_end": "2025-03-14T17:33:40.843Z",
"first_billing_at": "2025-02-28T17:33:40.843Z",
"previous_billing_at": "2025-02-14T17:33:40.843Z",
"billed_through": "2025-03-14T17:33:40.843Z",
"next_billing_at": "2025-03-14T17:33:40.843Z",
"started_at": "2025-02-14T17:33:40.843Z",
"trial_period_start": null,
"trial_period_end": null,
"created_at": "2025-02-14T17:33:40.843Z",
"items": [
{
"product_id": "prd_IhMUl3rrZ3",
"price_id": "pri_IhMUl3rrZ3",
"quantity": 1
}
]
},
"meta": {
"request_id": "req_IhMUl3rrZ3"
}
}