Create coupon

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Create a new discount coupon for the site.

Discount type

Provide either amount_off (fixed amount) or percent_off (percentage), but not both.

  • amount_off requires currency to be set
  • percent_off must be between 0 and 100

Code uniqueness

The code must be unique within the site. It accepts only letters and numbers (alphanumeric).

Plan restrictions

Pass an array of plan IDs in plans to restrict the coupon to specific plans. If set, the coupon can only be applied to subscriptions using those plans.

Expiration

  • redeem_by sets an expiration date (YYYY-MM-DD format, must be a future date)
  • max_redemptions limits how many times the coupon can be used
Query Params
int32
required
Body Params
string
required
length between 3 and 40
string
required
length between 3 and 255
string
enum
required
Allowed:
number
number
0 to 100
string
length between 3 and 3
date
integer
≥ 1
plans
array of integers
plans
metadata
object
Headers
string
required
Defaults to Bearer eyJ***
Responses

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