Cancel Subscription
Cancel Subscription
Cancels a customer’s subscription. If cancel_at_period_end is true, the subscription
will be canceled at the end of the current billing period. Otherwise, the subscription
is canceled immediately.
DELETE
Cancel Subscription
Authorizations
Use a Bearer token to access this API.
Path Parameters
Example:
"obj_01EXAMPLE00000000000000000"
Body
application/json
Example:
{
"cancel_at_period_end": false,
"refund": "none",
"refund_amount": 0
}Response
Success
Example:
{
"subscription_id": "obj_01EXAMPLE00000000000000000",
"created_at": "2024-01-01T00:00:00Z",
"items": [
{
"subscription_item_id": "obj_01EXAMPLE00000000000000000",
"quantity": 0,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"test_mode": false
}
],
"latest_invoice": "string",
"customer": "string",
"status": "incomplete",
"cancel_at_period_end": false,
"current_period_end": "string",
"current_period_start": "string",
"metadata": {},
"test_mode": false,
"client_secret": {},
"proration_behavior": "always_invoice",
"trial_start": "string",
"trial_end": "string",
"cancel_at": "2024-01-01T00:00:00Z",
"default_payment_method": "string"
}