v2
latestOpenAPI 3.0.12026-07-262352981007.0 KBSubscriptions
Cancel subscription
Cancels a subscription using the supplied cancellation request.
Supported cancellation types:
- PeriodEnd - Cancel subscription at the end of the billing cycle
- Immediate - Cancel subscription immediately
- Date - Cancel at specified 'CancelAt' date
If not supplied, PeriodEnd is used and the subscription is cancelled at the end of the billing cycle.
Default behaviour:
- If the subscription is trialing a tier, the tier is reverted to the previous tier at the end of the trials duration. This is only supported with PeriodEnd CancellationType.
- If the subscription is trialing add-on(s), the add-on is removed at the end of the trials duration. This is only supported with PeriodEnd CancellationType.
Important considerations:
- If 'cancelSubscription' is specified and set to 'true', the default behaviour specified above is ignored and the cancellation is applied directly on the subscription.
patch/subscriptions/{id}/cancel
Path parameters
idstring required
The unique identifier of the subscription
Request body
Example request
{
"preview": true
}Response
When request is successful. Returns a 'CancellationResponse' object.
Example response
{
"tier": {
"id": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"name": "Intake",
"prices": [
{
"default": true,
"active": true,
"type": "Recurring",
"name": "\"$109 per user/month\"",
"amount": 5900,
"interval": "Monthly"
}
],
"createdDate": "2022-04-23T14:00:00Z",
"updatedDate": "2022-04-23T14:00:00Z"
},
"addOns": [
{
"id": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"name": "Intake",
"prices": [
{
"default": true,
"active": true,
"type": "Recurring",
"name": "\"$109 per user/month\"",
"amount": 5900,
"interval": "Monthly"
}
],
"createdDate": "2022-04-23T14:00:00Z",
"updatedDate": "2022-04-23T14:00:00Z"
}
]
}