---
title: "Subscription - Cancel Subscription"
method: POST
path: "/subscriptions/{subscription_id}/cancel"
tags: ["Subscriptions"]
---

# Subscription - Cancel Subscription

`POST /subscriptions/{subscription_id}/cancel`

Cancel the subscription

## Path parameters

- `subscription_id` string, required

## Headers

- `X-Profile-Id` string, required

## Request body

- CancelSubscriptionRequest — Request payload for cancelling a subscription.
  - `cancel_option` 'immediately' | 'end_of_term' | 'specific_date'
  - `cancel_at` string, nullable — Optional date when the subscription should be cancelled (if not provided, cancels immediately)
  - `unbilled_charges_option` 'invoice' | 'delete'
  - `credit_option_for_current_term_charges` 'none' | 'prorate' | 'full'
  - `account_receivables_handling` 'no_action' | 'schedule_payment_collection' | 'write_off'
  - `refundable_credits_handling` 'no_action' | 'schedule_refund'
  - `cancel_reason_code` string, nullable — Reason code for canceling the subscription

## Response `200`

Subscription cancelled successfully

- CancelSubscriptionResponse — Response payload returned after successfully cancelling a subscription.
  - `id` string, required — A type for subscription_id that can be used for subscription ids
  - `status` 'active' | 'created' | 'in_active' | 'pending' | 'trial' | 'paused' | 'unpaid' | 'onetime' | 'cancelled' | 'failed', required — Possible states of a subscription lifecycle. - `Created`: Subscription was created but not yet activated. - `Active`: Subscription is currently active. - `InActive`: Subscription is inactive. - `Pending`: Subscription is pending activation. - `Trial`: Subscription is in a trial period. - `Paused`: Subscription is paused. - `Unpaid`: Subscription is unpaid. - `Onetime`: Subscription is a one-time payment. - `Cancelled`: Subscription has been cancelled. - `Failed`: Subscription has failed.
  - `merchant_reference_id` string, nullable — Merchant specific Unique identifier.
  - `profile_id` string, required — A type for profile_id that can be used for business profile ids
  - `merchant_id` string, required — A type for merchant_id that can be used for merchant ids
  - `customer_id` string, required — A type for customer_id that can be used for customer ids
  - `cancelled_at` string, nullable — Date when the subscription was cancelled

## Other responses

- `400` — Invalid cancel data
- `404` — Subscription not found

---

[API](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0.md) · [All operations](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hyperswitch/dynamic-routing-openapi-3-0/versions/8fbf69ab2597/schema)
