Make a Stripe key for Expiring Codes
Expiring Codes needs a restricted key: a Stripe key that can do only what you allow. Ours needs to create coupons and promotion codes, and nothing else. It can't see your customers, payments or payouts.
- In Stripe, open Developers, then API keys (or go to dashboard.stripe.com/apikeys).
- Click Create restricted key. If Stripe asks how you'll use it, choose the option for giving the key to another website or app.
- Name it Expiring Codes.
- Set Coupons to Write and Promotion Codes to Write. Leave everything else on None.
- Click Create key, copy the key (it starts with
rk_live_) and paste it into your Expiring Codes settings.
Trying it out first? Switch Stripe to test mode or a sandbox and make the same key there. It starts with
rk_test_, and test codes only work at test checkouts.Let customers enter the code
Stripe only shows a code box when the checkout allows it:
- Payment Links: edit the link and turn on Allow promotion codes.
- Stripe Checkout (from your own code or a tool like ThriveCart or a site builder):
allow_promotion_codesmust be on. Ask your tool's support if you can't find it.
To fill the code in for the reader, add it to a Payment Link: https://buy.stripe.com/your-link?prefilled_promo_code={{ subscriber.offer_code }}
Turn the key off any time under Developers, API keys, or click Disconnect in your settings and we delete it.