POST
/v1/subscriptions/{id}/cancelCancels a subscription now, or at the end of the period with at_period_end. Once canceled, nothing more is billed, retried or sent, and whatever is still owed stays owed.
Endpoint
Path parameters
| Name | Type | Description |
|---|---|---|
id | string | The subscription's ID, sub_.... |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
at_period_end | boolean | Optional | true cancels when the period ends. Default false: now. |
reason | string | Optional | Kept in its history. |