---
title: "Apply discount code"
method: POST
path: "/2026-04/subscription/{subscriptionId}/discount"
---

# Apply discount code

`POST /2026-04/subscription/{subscriptionId}/discount`

## Request

- Base URL: `https://api.loopsubscriptions.com/storefront`
- URL: `https://api.loopsubscriptions.com/storefront/2026-04/subscription/{subscriptionId}/discount`
- Auth: API key in header `Authorization`

This endpoint allows you to apply a valid discount code to the subscription, updating the pricing based on the associated promotion.

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `code` string, required: The shopify discount code which needs to be applied.

## Response `200`

Discount applied successfully

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `shopifyId` string
    - `code` string
    - `subscription` object
      - `id` integer
      - `shopifyId` integer
  - `code` string
  - `pageInfo` unknown

## Changes

- **2026-11-03** `1ff6a5700816`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/loopwork/apis/storefront-api/changes/2026-04/subscription/:subscriptionId/discount/post.md)

---

[API](https://skmtc.dev/loopwork/apis/storefront-api.md) - [All operations](https://skmtc.dev/loopwork/apis/storefront-api/llms.txt) - [OpenAPI document](https://skmtc.dev/loopwork/apis/storefront-api/revisions/1ff6a5700816?raw)
