---
title: "Update switch"
method: PATCH
path: "/subscription_switches/{switchId}"
---

# Update switch

`PATCH /subscription_switches/{switchId}`

Use this endpoint to manage a subscription switch. <br><br> Currently, this endpoint supports cancelling a pending switch. (Pending is the status of the switch between the subscription switch request and the actual switch processing.) <br><br> Cancelling a pending switch triggers a [`subscriptionSwitchCancelled`](https://developers.cleeng.com/docs/webhook-subscription-topics#subscriptionswitchcancelled) webhook. <br><br>  **Important** <br> Subscription upgrade and downgrade feature requires compatibility of the payment connector and payment gateway. Currently the feature is fully supported for the following: [Adyen](https://publisher.support.cleeng.com/hc/en-us/articles/4406573398930), [PayPal](https://publisher.support.cleeng.com/hc/en-us/articles/4406573425042). Please contact [Cleeng Support Team](https://publisher.support.cleeng.com/hc/en-us/requests/new) if you wish to use other payment connectors/gateways.

## Path parameters

- `switchId` string, required

## Request body

- object
  - `status` string, required — The status of the updated switch. Currently supported status: `cancelled`, `finished` (`finished` - only supported for <<glossary:externally-managed subscriptions>>).
  - `paymentId` integer — The identifier of Cleeng payment. It can be provided only for the status `finished`.

## Response `200`

200

- object
  - `id` string
  - `direction` string
  - `algorithm` string
  - `customerId` integer
  - `fromOfferId` string
  - `toOfferId` string
  - `subscriptionId` integer
  - `status` string
  - `createdAt` integer
  - `updatedAt` integer

## Other responses

- `400` — 400
- `404` — 404

---

[API](https://skmtc.net/cleeng/apis/mediastore-api.md) · [All operations](https://skmtc.net/cleeng/apis/mediastore-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cleeng/mediastore-api/versions/00cbfe7998a4/schema)
