Cancel a subscription
Changed onCancels a customer’s subscription immediately. The customer won’t be charged again for the subscription. After it’s canceled, the subscription is largely immutable. You can still update its metadata and cancellation_details.
Any pending invoice items that you’ve created are still charged at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false.
By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
Request
- Base URL: https://api.stripe.com
- URL: https://api.stripe.com/v1/subscriptions/{subscription_exposed_id}
- Auth: one of:
- HTTP basic
- HTTP bearer
Path parameters
Request body application/x-www-form-urlencoded
Response
Successful response.
Changes
- warning
added the new
final_payment_failureenum value to the///response property for the response status - warning
added the new
first_payment_failureenum value to the///response property for the response status
- warning
- info
added the optional property
to the response with the status
- info
Some revisions have not been checked yet.