API Reference
Update a Subscription
Updates a subscription. Can be used to cancel, resume, or swap plans.
PATCH
Update a Subscription
Update a subscription’s status or swap to a different plan.
Actions
cancel: Cancels the subscription at the end of the current billing period.cancel_immediately: Cancels the subscription immediately.resume: Resumes a subscription that was previously scheduled to cancel at period end.swap: Instantly swaps the subscription to a newvariant_idorproduct_id. Prorated charges will be applied automatically to the customer’s next invoice.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the subscription
Body
application/json
The action to perform on the subscription.
Available options:
cancel, cancel_immediately, resume, swap The ID of the target variant (required if action is swap, unless product_id is provided).
The ID of the target product (required if action is swap, unless variant_id is provided).
Response
200 - application/json
Subscription updated successfully
Update a Subscription