ApiDiscounts
Create a discount (coupon or automatic offer)
POST
bearerX-API-Version?stringAPI version for header-based versioning
Default
"1"Value in
"1""2"application/json- body
projectId*stringProject the discount applies to
mode?string"coupon" = customer enters the code at checkout · "offer" = applied automatically in its validity window
Default
"coupon"Value in
"coupon""offer"code*stringCode (uppercased; unique per project)
type*string"percent" or "amount" (fixed sats off)
Value in
"percent""amount"percentOff?number1–99 (when type=percent)
amountOffSats?numberFixed sats off (when type=amount)
startsAt?stringValidity start (ISO; empty = from now)
endsAt?stringValidity end (ISO; empty = no expiry)
maxRedemptions?numberMax total redemptions (empty = unlimited)
curl -X POST 'http://localhost:3001/api/v1/discounts' \ -H 'Content-Type: application/json' \ -d '{ "projectId": "string", "code": "LAUNCH20", "type": "percent"}'Example Response201
Empty