Skip to main content
POST
Create a coupon

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
code
string
required

1 to 64 ASCII letters, digits, hyphens or underscores. A promotional-credit (CREDIT) code is stored upper-case. Codes are matched as described on Coupon.code.

discount
object
required
description
string | null
expires_at
string<date-time> | null
plan_ids
string<MeteroidId>[]
recurring_value
integer<int32> | null
redemption_limit
integer<int32> | null
reusable
boolean

Whether one customer may redeem the coupon more than once. Must be false for a promotional-credit (CREDIT) coupon.

Response

Coupon created

code
string
required

A promotional-credit (CREDIT) code is stored upper-case; other codes as written. A code is redeemed by the coupon with exactly that code, else by the only live coupon equal to it ignoring the case of ASCII letters; several such coupons and no exact match make it ambiguous.

created_at
string<date-time>
required
disabled
boolean
required
discount
object
required
id
string<MeteroidId>
required
Example:

"cou_7n42DGM5Tflk9n8mt7Fhc7"

plan_ids
string<MeteroidId>[]
required
redemption_count
integer<int32>
required
reusable
boolean
required
archived_at
string<date-time> | null
description
string | null
expires_at
string<date-time> | null
recurring_value
integer<int32> | null
redemption_limit
integer<int32> | null