---
title: "Cancel subscription"
method: PUT
path: "/subscription/{id}/cancel"
tags: ["Subscription"]
---

# Cancel subscription

`PUT /subscription/{id}/cancel`

## Path parameters

- `id` string, required — Gateway subscription ID

## Headers

- `X-Request-ID` string

## Request body

- object
  - `cancelDate` string, date-time, nullable — If <b>cancelDate</b> is not passed or is set to <b>null</b>, subscription will be canceled immediately
  - `reason` string, nullable — Provide the reason for subscription cancellation
  - `sendEmail` boolean — Send an email upon subscription cancellation. Set to <b>true</b> by default
  - `keepActiveUntilNextRebill` boolean — If passed, <b>cancelDate</b> will be set to 1 hour before the expected rebill date, overriding any previously passed <b>cancelDate</b> value

## Response `200`

OK

- object
  - `id` string — Gateway subscription ID
  - `status` 'active' | 'canceled'
  - `type` 'trial' | 'free-trial' | 'regular'
  - `cycle` number — | value | description | |---|---| | 0 | subscription has an initial payment | | n | subscription has n recurrent payments |
  - `skuName` string
  - `siteId` string — Gateway site ID (created on the Merchant portal)
  - `renewalDate` string, date-time
  - `cancelDate` string, date-time, nullable
  - `consumerId` string — Gateway consumer ID (user ID)

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/centrobill/apis/centrobill-payment-api.md) · [All operations](https://skmtc.dev/centrobill/apis/centrobill-payment-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/centrobill/centrobill-payment-api/revisions/d0334aeb55ce/schema)
