Pause, resume or cancel a subscription billed by the platform.
Call this endpoint from your server with your private API key in the x-api-key header. A public key is refused with 401 and code 111022.
Allowed changes
| From | To |
|---|---|
started, active, past_due | paused, cancelled |
paused | active, cancelled |
Any other change is refused with 400 and code 111012, in particular from created, incomplete, cancelled and completed.
Pause
The offer must allow pausing. pause_cycles rebills are skipped and the subscription resumes by itself on its resume_date. The calendar does not shift.
Resume
status: active restarts billing on the next date of the unchanged calendar. It is refused when that date would fall after the end date of the offer: the subscription stays paused.
Cancel
The subscription becomes cancelled, a final status. cancelled_by is set by the platform (api for a cancellation through this endpoint) and is never accepted in the request.
Result
The response gives the new state of the subscription. A subscription webhook is sent for the change of status. See Subscription lifecycle, Failed rebills and retries, Update the payment method.
Examples
Select a card to show its request and response in the panels on the right. "Pause for 2 billing cycles" is shown by default.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||