---
title: "Create a discount."
method: POST
path: "/v1/discounts"
tags: ["Discounts"]
---

# Create a discount.

`POST /v1/discounts`

Create promotional discount codes for products. Set percentage or fixed amount discounts with expiration dates.

## Request body

- CreateDiscountRequestEntity
  - `name` string, required — The name of the discount.
  - `code` string — Optional discount code. If left empty, a code will be generated.
  - `type` 'percentage' | 'fixed', required — The type of the discount, either "percentage" or "fixed".
  - `amount` number — The fixed value for the discount. Only applicable if the type is "fixed".
  - `currency` string — The currency of the discount. Only required if type is "fixed".
  - `percentage` number — The percentage value for the discount. Only applicable if the type is "percentage".
  - `expiry_date` string, date-time — The expiry date of the discount.
  - `max_redemptions` number — The maximum number of redemptions for the discount.
  - `duration` 'forever' | 'once' | 'repeating', required — The duration type for the discount.
  - `duration_in_months` number — The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription.
  - `applies_to_products` string[], required — The list of product IDs to which this discount applies.

## Response `200`

Successfully created a discount

- DiscountEntity
  - `id` string, required — Unique identifier for the object.
  - `mode` 'test' | 'prod' | 'sandbox', required — String representing the environment.
  - `object` string, required — A string representing the object’s type. Objects of the same type share the same value.
  - `status` 'deleted' | 'active' | 'draft' | 'expired' | 'scheduled', required — The status of the discount (e.g., active, inactive).
  - `name` string, required — The name of the discount.
  - `code` string, required — The discount code. A unique identifier for the discount.
  - `type` 'percentage' | 'fixed', required — The type of the discount, either "percentage" or "fixed".
  - `amount` number — The amount of the discount. Can be a percentage or a fixed amount.
  - `currency` string — The currency of the discount. Only required if type is "fixed".
  - `percentage` number — The percentage of the discount. Only applicable if type is "percentage".
  - `expiry_date` string, date-time — The expiry date of the discount.
  - `max_redemptions` number — The maximum number of redemptions allowed for the discount.
  - `duration` 'forever' | 'once' | 'repeating' — The duration type for the discount.
  - `duration_in_months` number — The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription.
  - `applies_to_products` string[] — The list of product IDs to which this discount applies.
  - `redeem_count` number — The number of times this discount has been redeemed.

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Not Found - Resource does not exist

---

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