> 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/cancel-subscription-pause.md).

# Cancel subscription pause

Use the **cancelRenewalPause** method to cancel a subscription's pause and change its status.

## Request parameters

<table><thead><tr><th width="164.933349609375">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>merchantCode</code></td><td><p><strong>Required (string)</strong> </p><p>Unique merchant ID code that can be found in the Merchant Control Panel.</p></td></tr><tr><td><code>SubscriptionRef</code></td><td><p><strong>Required (string)</strong></p><p>The system-generated reference code of the subscription.</p></td></tr></tbody></table>

### Request sample

```php
<?php

$host = 'https://api.2checkout.com/rpc/6.0/';

$merchantCode = "22322"; // MERCHANT CODE
$key = "q0^H5i?q3=)x9NP02W3q"; // MERCHANT SECRET KEY

$string = strlen($merchantCode) . $merchantCode . strlen(gmdate('Y-m-d H:i:s')) . gmdate('Y-m-d H:i:s');
$hash = hash_hmac('md5', $string, $key);

$i = 1; // counter for api calls
// call login
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'login';
$jsonRpcRequest->params = array($merchantCode, gmdate('Y-m-d H:i:s'), $hash);
$jsonRpcRequest->id = $i++;

$sessionID = callRPC($jsonRpcRequest, $host);
var_dump("session id:" . $sessionID);

// call api methods below


$SubscriptionRef = 'FA27DD5072';

$jsonRpcRequest = array (
    'jsonrpc' => '2.0',
    'method' => 'cancelRenewalPause',
    'params' => array($sessionID, $SubscriptionRef),
    'id' => $i++
);
var_dump ("cancelRenewalPause", callRPC((Object)$jsonRpcRequest, $host));
print ("If TRUE pause is canceled");


/* $jsonRpcRequest = array (
    'jsonrpc' => '2.0',
    'method' => 'getRenewalPause',
    'params' => array($sessionID, $SubscriptionRef),
    'id' => $i++
);
var_dump ("getRenewalPause", callRPC((Object)$jsonRpcRequest, $host));
*/
function callRPC($Request, $hostUrl, $Debug = false) {
    $curl = curl_init($hostUrl);
    curl_setopt( $curl, CURLOPT_POST, 1);
    curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt( $curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));

    $RequestString = json_encode($Request);
    curl_setopt( $curl, CURLOPT_POSTFIELDS, $RequestString);

    curl_setopt( $curl, CURLOPT_COOKIE, "XDEBUG_SESSION=PHPSTORM");

    if (stristr($hostUrl, 'sandboxdev') || stristr($hostUrl, 'git-sb')) {
        curl_setopt( $curl, CURLOPT_PROXY, 'localhost:3128');
        //  curl_setopt( $curl, CURLOPT_PROXY, 'proxy.avangate.local:8080');
        //  curl_setopt( $curl, CURLOPT_PROXYUSERPWD, 'andrei.avramica:pw'); // for authenticated proxies
    }

    $ResponseString = curl_exec ($curl);

    if (!empty($ResponseString)) {
        $Response = json_decode ($ResponseString,false);
        if (isset($Response->error) && !is_null($Response->error)) {
            var_dump($Response->error) ;
            return null;
        }

        return $Response->result;
    } else {
        return null;
    }
}
```

## Response parameters

<table><thead><tr><th width="163.8665771484375">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>SubscriptionRef</code></td><td><p><strong>Boolean</strong></p><ul><li>TRUE - if the call was successful and a pause was scheduled;</li><li>FALSE - if the pause mechanism is not enabled for the merchant OR any of the eligibility conditions were not met OR pause is not enabled for the product OR the maximum pause duration for the product was exceeded. In this case, the system also throws the following message: "The subscription is not eligible for pause."</li></ul></td></tr></tbody></table>

### Response sample

```php
{
    “StartDate”: “2020-02-19 22:20:30",
    “ResumeDate”: “2020-03-01 18:00:00",
    “PauseReason”: “vacation leave”
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
