---
title: "Create a discount code for any payment method"
method: POST
path: "/api/v1/admin/promo-codes"
tags: ["Promo codes"]
---

# Create a discount code for any payment method

`POST /api/v1/admin/promo-codes`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/admin/promo-codes`
- Auth: HTTP bearer

## Request body

- PromoCreateInputBody
  - `amount_off` integer: US cents
  - `code` string, required
  - `expires_at` string, date-time
  - `kind` 'percent' | 'amount', required
  - `max_redemptions` integer
  - `percent` integer
  - `plans` string[], nullable

## Response `201`

Created

- PromoCodeBody
  - `active` boolean, required
  - `amount_off` integer, required: Discount in US cents, 0 for a percent discount; tenge payments get the same share off
  - `code` string, required
  - `created_at` string, date-time, required
  - `expires_at` string, date-time, nullable, required
  - `id` integer, required
  - `kind` 'percent' | 'amount', required
  - `max_redemptions` integer, nullable, required: null means no limit
  - `percent` integer, required: Discount in percent, 0 for an amount discount
  - `plans` string[], nullable, required: Plans the code works for, empty for every paid plan
  - `redemptions` integer, required: Paid orders that used the code

## Other responses

- `403`: Forbidden
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
