---
title: "Apply coupon"
method: PATCH
path: "/customers/{customerId}/subscriptions/{subscriptionId}"
---

# Apply coupon

`PATCH /customers/{customerId}/subscriptions/{subscriptionId}`

Use this endpoint to apply coupon on existing subscription. The coupon previously has to be configured in **Cleeng Dashboard -> Offers & Coupons -> Coupon Management**.

## Path parameters

- `customerId` string, required
- `subscriptionId` string, required

## Request body

- object
  - `couponCode` string, required — Coupon code that have been entered

## Response `200`

200

- object
  - `responseData` object
    - `success` boolean
    - `subscription` object
      - `subscriptionId` integer
      - `paymentDetailsId` unknown
      - `customerId` integer
      - `status` string
      - `dateTo` integer
      - `subscriptionExternalId` unknown
      - `offerId` string
      - `paymentCountry` string
      - `ipAddress` unknown
      - `couponCode` string
      - `coupon` object
        - `discountRate` number
        - `usageLeft` integer
    - `message` string
  - `errors` unknown[]
    - unknown

## Other responses

- `422` — 422

---

[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)
