Subscriptions
Cancel Subscription
Cancel a subscription. Use when a customer churns or downgrades. Supports immediate or end-of-period cancellation with optional proration.
PUT
Cancel Subscription
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/flexprice/flexprice/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Unique identifier of the subscription to cancel.Example:
"sub_x1y2z3a4b5c6d7e8f9g0"Request Body
When the cancellation takes effect.Options:
"IMMEDIATE"- Cancel immediately"END_OF_PERIOD"- Cancel at the end of the current billing period
How to handle proration when cancelling.Options:
"NONE"- No proration"CREATE_PRORATIONS"- Generate proration credits/charges
Whether to generate a final invoice on immediate cancellation.Options:
"SKIP"- Do not generate invoice"GENERATE"- Generate final invoice
Reason for cancellation (for audit and business intelligence).Example:
"Customer requested cancellation"Response
ID of the cancelled subscription.
Type of cancellation performed.
ISO 8601 timestamp when the cancellation takes effect.
New status of the subscription.Values:
"CANCELLED", "ACTIVE" (if cancelling at period end)Reason for cancellation (if provided).
Proration invoice details (if proration was applied).
Array of line-item level proration information.
Total credit amount from proration (decimal as string).
Human-readable message about the cancellation.
ISO 8601 timestamp when the cancellation was processed.
Example Request - Immediate Cancellation
cURL
Example Request - End of Period Cancellation
cURL
Example Response - Immediate Cancellation with Proration
Example Response - End of Period Cancellation
Cancel Subscription