> 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/soap-api-reference/soap-api-6.0/api-requests/subscription/pause-subscription.md).

# Pause subscription

Use the **pauseSubscription** method to suspend all automatic charges for a predefined time period for a subscription.

{% hint style="warning" %}
**You cannot pause a subscription that has active addon subscriptions with automatic renewal enabled, and you cannot pause an addon subscription.**
{% endhint %}

## Request parameters

<table><thead><tr><th width="162.7999267578125">Parameter</th><th>Type / Description</th></tr></thead><tbody><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><tr><td><code>ResumeDate</code></td><td><p><strong>Required (number)</strong></p><p>Date when the subscription should be resumed. Format "YYYY-MM-DD". The resume date needs to be set within 3 years starting from the day the subscription expires. The timezone used is the one on the server.</p></td></tr><tr><td><code>PauseReason</code></td><td><p><strong>Optional (string)</strong></p><p>Freeform text filled in by the merchant. Text is limited to 100 characters.</p></td></tr></tbody></table>

### Request sample

```php
<?php
$sb = "58";
$vers = "6.0";
$client = new SoapClient("http://api.sandbox" . $sb . ".avangate.local/soap/$vers/?wsdl", array(
    'location' => "http://api.sandbox" . $sb . ".avangate.local/soap/$vers/",
    'cache_wsdl' => WSDL_CACHE_NONE,
    "trace" => 1));
$date = gmdate('Y-m-d H:i:s');
$merchantCode = "666999";
$key = "%y~8|m]T84p[W4+O1]_?";
$string = strlen($merchantCode) . $merchantCode . strlen($date) . $date;
$hash = hash_hmac('md5', $string, $key);
$sessionID = $client->login($merchantCode, $date, $hash);
var_dump("session: ", $sessionID);
//$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
$SubRef = "B7D8E72224";
$resumeDate = "2020-09-30 17:00:00";
$reason = "vacation leave";
try {
    $addPause = $client->setRenewalPause($sessionID, $SubRef, $resumeDate, $reason);
    var_dump("setRenewalPause:", $addPause);
} catch (SoapFault $e) {
    echo "Error setRenewalPause: " . $e->getMessage();
}
try {
    $renewalPause = $client->getRenewalPause($sessionID, $SubRef);
    var_dump("getRenewalPause:", $renewalPause);
} catch (SoapFault $e) {
    echo "Error getRenewalPause: " . $e->getMessage();
}
exit;
```

## Response parameters

The **pauseSubscription** call returns TRUE/FALSE parameters.

<table><thead><tr><th width="161.7333984375">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>SubscriptionRef</code></td><td><strong>Boolean</strong><br>- TRUE - if the call was successful and a pause was scheduled;<br>- 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."</td></tr><tr><td><code>ResumeDate</code></td><td><strong>Boolean</strong><br>- TRUE - if the call was successful and a pause was scheduled;<br>- 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."</td></tr></tbody></table>

## Error codes

| Error code           | Description                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------- |
| **INVALID\_LICENCE** | Cannot pause subscription \[subscription reference] because it has active addon subscriptions. |
| **INVALID\_LICENCE** | Cannot pause subscription \[subscription reference] because it is an addon subscription.       |


---

# 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/soap-api-reference/soap-api-6.0/api-requests/subscription/pause-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.
