Coupons
Promo codes that adjust checkout pricing
Coupons apply a discount at billing checkout. Management endpoints are restricted to platform super admins; validation is open to any authenticated caller.
Resource overview
POST
/api/coupons/validateAPI key · SessionGET
/api/couponsSessionRole: Super AdminPOST
/api/couponsSessionRole: Super AdminGET
/api/coupons/{id}SessionRole: Super AdminPATCH
/api/coupons/{id}SessionRole: Super AdminDELETE
/api/coupons/{id}SessionRole: Super AdminValidate coupon
POST
/api/coupons/validateAPI key · Session| Name | Type | Required | Description |
|---|---|---|---|
code | string | Required | Coupon code, case-insensitive. |
planId | string | Optional | Plan being purchased — required when a coupon is plan-scoped. |
200
{
"valid": true,
"code": "WELCOME20",
"discountType": "percent",
"discountValue": 20,
"appliesTo": "first_invoice"
}200Invalid code — 200 is intentional so clients can branch on `valid`.
{ "valid": false, "reason": "expired" }Manage coupons (super admin)
GET
/api/couponsSessionRole: Super AdminPOST
/api/couponsSessionRole: Super AdminGET
/api/coupons/{id}SessionRole: Super AdminPATCH
/api/coupons/{id}SessionRole: Super AdminDELETE
/api/coupons/{id}SessionRole: Super Admin