Skip to main content
POST
cURL
Takes one reward in the catalog’s shape (see Discounts and promotion codes). A coupon is a percentage (percentOff) or a fixed amount in cents (amountOffCents) off, once, repeating for durationMonths, or forever, on the paid plans planIds names (every version of each), or every paid plan with null. It never discounts usage or credit packs. promotionCodes are the reward’s catalog codes: ones left out are deactivated, and codes added with Add a promotion code are kept. Changing the amount, duration or plans makes a new Stripe coupon; customers who already have the discount keep its terms, and every active code moves to the new coupon with its remaining uses. An unknown or free plan returns 400 invalid_reward, and a code already active on another reward 409 promotion_code_taken. Needs the Catalog permission at Write.

Authorizations

Authorization
string
header
required

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

Body

application/json
id
string
required

Your ID for the reward: letters, numbers, _ or -. It can't be changed.

Required string length: 1 - 100
Pattern: ^[a-zA-Z0-9_-]+$
name
string
required

Shown in the dashboard and as the coupon's name in Stripe.

Required string length: 1 - 120
promotionCodes
object[]
required

The reward's catalog codes. Codes made with POST /v1/rewards/{rewardId}/promotion-codes are kept.

Maximum array length: 100
coupon
object

What comes off: a percentage or an amount, for how long, on which plans. Send this or grant.

grant
object

What the customer gets instead: credits or a metered feature's units, granted when they redeem the code. Send this or coupon.

maxRedemptions
integer | null

Redemptions across every code of the reward. Null: no limit.

Required range: x <= 2147483647
redeemBy
string<date-time> | null

No new redemptions after this time.

oncePerCustomer
boolean

A customer redeems the reward at most once, through any code. Defaults to true.

Response

The reward, created or updated. A change to its amount, duration or plans mints a new Stripe coupon; customers who already have the discount keep its terms.

item
object
required
changed
boolean
required