Skip to main content
PUT
cURL
Pass the exact opaque customerId as a URL-encoded query value and the numeric subscriptionId from List customer subscriptions. Set cancelAtPeriodEnd to true to stop the next renewal or false to resume it before the period ends. Retrying the same desired state is safe. Ledger verifies that the Stripe subscription belongs to this customer, organization, environment, and plan before changing it. Stopping renewal does not refund the current period. The plan and its remaining plan credits stay available until the paid period ends; purchased credit packs are unaffected. Resuming restores future monthly billing. A pending plan upgrade or a Stripe pause, schedule, custom cancellation date, or mismatched subscription blocks the change. Stripe unavailability returns an error rather than guessing the state. This endpoint manages an active paid subscription. It does not cancel an unpaid Checkout link. Use Billing and Checkout for payment timing and List customer purchases for credit packs.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

subscriptionId
integer
required
Required range: x <= 2147483647

Query Parameters

customerId
string
required
Required string length: 1 - 255

Body

application/json
cancelAtPeriodEnd
boolean
required

Response

Paid subscription renewal setting

cancelAtPeriodEnd
boolean
required
cancelsAt
string<date-time> | null
required