> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/disable-a-subscription.md).

# Disable a subscription

Use the **cancelSubscription** method to disable an active subscription. 2Checkout disables the subscription immediately and no longer performs any recurring billing actions.

## Request parameters

<table><thead><tr><th width="218.2666015625">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><strong>Required (string)</strong><br>Session identifier, the output of the <strong>Login</strong> method. Include <code>sessionID</code> into all your requests. 2Checkout throws an exception if the values are incorrect. The <code>sessionID</code> expires in <strong>10 minutes</strong>.</td></tr><tr><td><code>SubscriptionReference</code></td><td><strong>Required (string)</strong><br>Unique, system-generated subscription identifier.</td></tr><tr><td><code>ChurnReasons</code></td><td><p><strong>Array</strong><br><strong>Possible values for this field are:</strong></p><ul><li>CHURN_REASON_NOT_SATISFIED_PRODUCT</li><li>CHURN_REASON_ENABLED_BY_MISTAKE</li><li>CHURN_REASON_PREFER_MANUAL</li><li>CHURN_REASON_ALREADY_RENEWED</li><li>CHURN_REASON_DONT_NEED</li><li>CHURN_REASON_WANT_PAUSE</li><li>CHURN_REASON_COVID</li><li>CHURN_REASON_HIGH_PRICE</li><li>CHURN_REASON_NOT_SATISFIED_SUPPORT</li><li>CHURN_REASON_EXTRAORDINARY</li><li>CHURN_REASON_OTHER</li></ul></td></tr><tr><td><code>ChurnReasonOther</code></td><td><strong>String</strong><br>This field should have a value only if the <code>ChurnReasons</code> has the <strong>CHURN_REASON_EXTRAORDINARY</strong> or <strong>CHURN_REASON_OTHER</strong> values</td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';

$jsonRpcRequest = array (
'method' => 'cancelSubscription',
'params' => array($sessionID, $subscriptionReference),
'id' => $i++,
'jsonrpc' => '2.0');

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));
```

## Response

<table><thead><tr><th width="124.4000244140625">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Boolean</strong></td><td><strong>true</strong> or <strong>false</strong> depending on whether the call resulted in success or not.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/disable-a-subscription.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
