# Stop a subscription

`PATCH https://api.cryptohopper.com/v1/subscription/{subscription_id}`

Part of [Subscriptions](https://www.cryptohopper.com/api-documentation/api-reference/subscriptions.md) in the Cryptohopper API reference.

Turns off auto-renewal of a subscription and cancels the recurring payment at the payment provider. The subscription stays active until its end date.

OAuth scope: `read`, `manage`

Takes no request body. If cancelling at the payment provider fails, the endpoint returns HTTP 200 with the message "There was an error trying to cancel the subscription, please try again."

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `subscription_id` | string | yes | ID of the subscription. |

## Example request

```bash
curl -X PATCH "https://api.cryptohopper.com/v1/subscription/SUBSCRIPTION_ID" \
  -H "access-token: YOUR_ACCESS_TOKEN"
```

## Response

Example response (illustrative values):

```json
{
    "data": "Subscription has been stopped, and will be deactivated after the end of the subscription."
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
