Create a coupon


You can create coupons easily via the coupon management page of the dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

A coupon has a discountType of either of the amount or percentage. If you set it to amount, that amount will be subtracted from the order's subtotal. For example, an order with a subtotal of ¥5,000 will have a final total of ¥0 if a coupon with an amount coupon with a discountAmount of ¥10,000 is applied to it, and an order with a subtotal of ¥20,000 will have a final total of ¥10,000 if the same coupon with a discountAmount of ¥10,000 is applied to it.

Errors

For possible error responses, see Errors.

Body Params

Create Coupon

string

Three-letter ISO currency code, in uppercase. Must be a supported currency.

number
≥ 0

required if discountType is amount. The amount of this coupon object.

number
0 to 100

required if discountType is percentage. The discount percentage of this coupon object.

string
enum
required

Discount Type

Allowed:
integer

Time at which the Coupon expires. Measured in milliseconds since the Unix epoch.

integer

Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.

metadata
object

Set of up to 20 key-value pairs that you can attach to the object.

string
required
length between 1 and 80

The coupon's name, meant to be displayable to the customer.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json