Check a promotion code
Check a promotion code (admin)
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
Checks a promotion code made in Stripe (active, its coupon valid) and returns what it takes off and the
plans it applies to, so a plan picker can show the discounted prices. 422 under promotion_code when
the code is unknown, used up or fits no plan. Checkout checks the code again for the plan chosen.
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
application/json- body
promotion_code*stringlength <= 100The code's discount and plans
application/json- response
code*stringpercent_off?numberPercent taken off; absent for an amount off.
amount_off?integerAmount taken off per invoice, in cents of currency; absent for a percent off.
currency?stringduration?stringHow long the discount lasts.
"once""repeating""forever"duration_in_months?integerMonths the discount lasts when duration is repeating.
plans*array<string>Ids of the plans the code applies to.
curl -X POST 'https://staqly.example.com/v1/billing/promotion-code' \ -H 'Content-Type: application/json' \ -d '{ "promotion_code": "SPRING20"}'{ "code": "SPRING20", "percent_off": 0, "amount_off": 0, "currency": "eur", "duration": "once", "duration_in_months": 0, "plans": [ "plus", "pro" ]}