v1
latestOpenAPI 3.1.02026-07-2684271522.2 KBSubscriptions
Cancel Subscription
Cancels a customer's subscription. By default the subscription is canceled immediately; set cancel_at_period_end to true to keep it active until the end of the current billing period instead.
Optionally issue a refund as part of the cancellation by setting refund to full, prorated, or custom (a custom refund requires a positive refund_amount in the smallest currency unit). Refunds are processed as a separate operation from the cancellation. The request body is optional; omitting it cancels immediately with no refund.
delete/v1/subscriptions/{id}
Path parameters
idstring required
Example:fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA
Request body
Example request
{
"subscription": {
"cancel_at_period_end": false,
"refund": "none",
"refund_amount": 2500
}
}Response
An envelope wrapping a single subscription object.
Example response
{
"subscription": {
"subscription_id": "fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"created_at": "2026-06-15T14:30:00Z",
"items": [
{}
],
"status": "incomplete",
"cancel_at_period_end": false,
"current_period_end": "string",
"current_period_start": "string",
"metadata": {
"order_id": "8842",
"channel": "shopify"
},
"test_mode": false,
"client_secret": {},
"proration_behavior": "always_invoice",
"trial_start": "string",
"trial_end": "string",
"cancel_at": "2026-06-15T14:30:00Z",
"canceled_at": "2026-06-15T14:30:00Z"
}
}