Cancel subscription

📘

API Refs

Path parameters

NameTypeDescriptionRequired
idstringStripeSubscriptionID to cancelyes

Request body

NameTypeDescriptionRequired
cancellation_reasonstringReason for cancellation (optional)no

Response

Returns the updated subscription object with:

  • id: StripeSubscriptionID
  • status: Updated subscription status
  • canceledAt: Cancellation timestamp
  • cancelAtPeriodEnd: Whether cancellation is at period end

Description

This endpoint cancels a subscription immediately. The subscription status will be updated to canceled and the cancellation timestamp will be recorded. You can optionally provide a cancellation reason for your records.