Test and live modes
Every workspace has two separate sets of data. The key you send decides which one a request uses.
The key decides the mode
A key carries its mode in its prefix: gpy_test_… or gpy_live_…. There is no mode parameter on API requests. A request made with a test key reads and writes test data only, and a live key reads and writes live data only.
A key is created in the mode the dashboard is showing at the time. The mode is stored with the key and is also part of the key itself. If the two ever disagree, the key is refused with 401.
What is separate
Customers, subscriptions, invoices, payments, usage, API keys and webhook endpoints all belong to one mode.
- A webhook endpoint added in test mode receives test events only. Add a second endpoint in live mode before you go live.
- Each mode has its own Stripe credentials, set under Settings › Payments.
- Events carry no mode field in their body today. The endpoint that received the event tells you the mode.
In the dashboard
The dashboard has a mode switch. Signed-in requests send the chosen mode in an X-Mint-Mode header (test or live); without it the request uses test mode. API keys ignore that header: their mode comes from the key.
Going live
- Connect your live Stripe keys under Settings › Payments.
- Create your products and plans in live mode. Plans made in test mode are not copied.
- Create a live key and store it as a secret on your server.
- Add your live webhook endpoint and store its signing secret.