# Resume

- Sandbox: `PATCH https://sandbox.payme.io/api/subscriptions/{sub_payme_id}/resume`
- Production: `PATCH https://live.payme.io/api/subscriptions/{sub_payme_id}/resume`

## Credentials

- Header `PayMe-Merchant-Key` (optional): MPL. Your private key in PayMe system.

## Overview

**Relevant only for Direct API Integration**

This endpoint is used to resume subscriptions is in status "paused".
You can find more information in our guide - [How to create a subscription
](/guides-and-use-cases-migrated/payments/how-to-create-subscription).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `PayMe-Merchant-Key` | header | string | no | MPL. Your private key in PayMe system. |
| `sub_payme_id` | path | string | yes |  |

## Request body

Content type: `application/json`

## Code samples

### curl

```bash
curl -X PATCH 'https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/resume' \
  -H 'Content-Type: application/json' \
  -H 'PayMe-Merchant-Key: <PayMe-Merchant-Key>' \
  --data-raw '{}'
```

### Node.js

```javascript
const response = await fetch("https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/resume", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "PayMe-Merchant-Key": "<PayMe-Merchant-Key>",
  },
  body: JSON.stringify({}),
});

console.log(await response.text());
```

### Python

```python
import requests

response = requests.patch(
    "https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/resume",
    headers={
        "PayMe-Merchant-Key": "<PayMe-Merchant-Key>",
    },
    json={},
)

print(response.text)
```

### PHP

```php
<?php

$body = <<<'BODY'
{}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/resume');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'PayMe-Merchant-Key: <PayMe-Merchant-Key>',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
```

## Responses

### 200 — OK (success)
