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

# Cancel Subscription

> Cancel an active subscription.

# Cancel Subscription

Cancel a subscription. The subscription remains active until the current billing period ends.

## Path Parameters

<ParamField path="subscription_id" type="string" required>
  The subscription ID to cancel.
</ParamField>

## Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "sub_abc123",
    "status": "cancelled",
    "cancelled_at": "2026-01-20T15:00:00.000Z"
  }
}
```

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.khaime.com/api/v1/partner/subscriptions/sub_abc123/cancel \
    -H "X-API-Key: pk_sandbox_your_key"
  ```
</RequestExample>
