---
title: "createCouponCode"
method: POST
path: "/core/api/v1/fsPayment/coupon/create"
tags: ["fs-payment-controller"]
---

# createCouponCode

`POST /core/api/v1/fsPayment/coupon/create`

## Request

- Base URL: `https://api.freshlearn.com`
- URL: `https://api.freshlearn.com/core/api/v1/fsPayment/coupon/create`
- Auth: none declared

## Headers

- `Authorization` string
- `domain` string
- `api-key` string

## Request body

- FsCouponPlanDiscountDto
  - `active` boolean
  - `couponCode` string
  - `currency` string
  - `description` string
  - `discountAmount` number
  - `discountPercentage` integer
  - `duration` 'once' | 'repeating' | 'forever'
  - `durationInMonths` integer
  - `hasPlanSpecificDiscounts` boolean
  - `id` integer
  - `name` string
  - `planDiscounts` PlanDiscountDto[]
    - `discountAmount` number
    - `discountPercentage` integer
    - `planType` string
  - `planTypes` string[]

## Response `200`

OK

## Other responses

- `201`: Created
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/freshlearn/apis/freshlearn-api.md) · [All operations](https://skmtc.dev/freshlearn/apis/freshlearn-api/llms.txt) · [OpenAPI document](https://skmtc.dev/freshlearn/apis/freshlearn-api/revisions/8a82ee14b586?raw)
