> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kwikpaisa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Subscription

***

## icon: calendar-x

# Cancel Subscription

Use the Cancel Subscription API to cancel an existing subscription.

This API allows merchants to cancel a subscription using its unique subscription ID. Once successfully cancelled, the subscription status is updated to `revoked`.

## Endpoint

```text theme={null}
POST /api/v3/pg/subscription/{subscription_id}/cancel
```

## Authentication

Every API request must include the required authentication headers.

See the Authentication Guide for details.

## Path Parameters

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `subscription_id` | string | Yes | Unique subscription ID (`mand_...`) that needs to be cancelled. |

## Request Body

No request parameters are required in the body.

```text theme={null}
{}
```

## Example Request

```text theme={null}
curl --request POST \
  --url https://sandbox.kwikpaisa.com/api/v3/pg/subscription/mand_0112f7c3-cda2-4405-b4f6-c0c5f2a97b17/cancel \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --header "X-API-KEY: YOUR_API_KEY" \
  --header "X-TIMESTAMP: GENERATED_TIMESTAMP" \
  --header "X-SIGNATURE: GENERATED_SIGNATURE" \
  --data '{}'
```

## Signature Generation

For this request, the payload is empty. Generate the HMAC-SHA256 signature using the JSON-encoded empty payload (`[]`) concatenated with the request timestamp.

Refer to the Authentication Guide for signature generation details.

## Successful Response

When the subscription is eligible for cancellation, the API returns the updated subscription details.

```text theme={null}
{
  "status": true,
  "message": "Subscription cancelled successfully.",
  "data": {
    "mandate_id": "mand_0112f7c3-cda2-4405-b4f6-c0c5f2a97b17",
    "customer_id": "cust_d71f980e-4b3f-4e9b-9d14-7cfa92fd9134",
    "plan_id": "plan_7ec2fc01-2361-45ea-945b-936d88251844",
    "type": "upi",
    "reference_id": "1794406777",
    "amount_type": "fixed",
    "amount": "699.00",
    "currency": "INR",
    "frequency": "monthly",
    "interval_count": 1,
    "quantity": 1,
    "total_cycles": 12,
    "start_date": null,
    "end_date": null,
    "start_at": null,
    "paid_count": 0,
    "remaining_count": 12,
    "authorization_url": null,
    "status": "revoked",
    "metadata": {
      "purpose": "subscription",
      "package": "gold",
      "addons": [
        {
          "item": {
            "name": "Delivery charges",
            "amount": 3000,
            "currency": "INR"
          }
        }
      ]
    },
    "created_at": "2026-11-11T14:19:38.000000Z",
    "updated_at": "2026-11-11T14:37:12.000000Z"
  }
}
```

## Error Responses

### Subscription Cannot Be Cancelled

If the subscription is already cancelled (`revoked`), expired, or deleted, it cannot be cancelled again.

```text theme={null}
{
  "status": false,
  "message": "Subscription cannot be cancelled in its current status."
}
```

### Subscription Not Found

If the requested subscription does not exist or does not belong to the authenticated merchant, the API returns:

```text theme={null}
{
  "status": false,
  "message": "Subscription not found."
}
```

## Important Notes

* The subscription ID must belong to the authenticated merchant.
* Subscriptions that are already cancelled, expired, or deleted cannot be cancelled again.
* On successful cancellation, the subscription status becomes `revoked`.
* The API returns the updated subscription details in the `data` object.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.