Environments
Every Stridge workspace has a sandbox, and once it goes live, a live environment too. Both use one base URL and one API, so you build against the sandbox and switch to live by changing the key.
| Property | Sandbox | Live |
|---|---|---|
| Exists | Sandbox In every workspace | Live Once the workspace goes live |
| Secret key | Sandboxsk_sbx_… | Livesk_live_… |
| Publishable key | Sandboxpk_sbx_… | Livepk_live_… |
| Base URL | https://api.stridge.com/v2 for both. The key decides the environment. | |
| Chains | Sandbox Simulated chains | Live Real chains |
| Money | Sandbox Deposits, settlements and payouts behave as they do in live but never move real value | Live Settles on real chains with real funds. A payout that has been broadcast cannot be taken back |
livemode | Sandboxfalse | Livetrue |
| Use it for | Sandbox Development, tests and the docs Try it console | Live Production traffic that moves real money |
The key decides
You never pick an environment in the request: the key you send decides it. A sandbox key always acts in your sandbox, and a live key always acts in live. No header, query parameter or path changes that.
Send the key on its own. If you also send X-Stridge-Environment, the request
fails with 400 header_invalid (environment header not accepted).
Keep the base URL and swap the key:
curl "https://api.stridge.com/v2/payouts" \
-H "Authorization: Bearer $STRIDGE_SANDBOX_KEY"Reading livemode
livemode tells you which environment any payload came from: true for live, false for a sandbox. Every resource and every event carries it. When your code needs to know where a response, a stored payload or a webhook event came from, read livemode rather than inferring it from anything else.
| What you read | livemode | environment_id |
|---|---|---|
| A resource, such as a deposit, a payout or a webhook endpoint | livemodeCarried | environment_idCarried, beside it |
A thin event, as the Events API returns it and as an endpoint created through /v2receives it | livemodeCarried | environment_idNot carried |
| Reference data, such as networks and prices | livemodeNot carried | environment_idNot carried |
A resource also carries the environment_id it belongs to. A thin event carries livemode alone. Reference data belongs to no environment and carries neither.
What differs
Code written against the sandbox runs unchanged in live, because request and response shapes are the same in both. What differs is the money, set out in the comparison above, and which operations each environment's keys can call.
Live keys only
Managing webhook endpoints with a key is available to live keys only. That covers listing, reading, creating, updating and deleting endpoints, and rotating their signing secret.
- Calling one of these with a sandbox key returns
404operation_not_served(this operation is served to live keys only). - A sandbox key cannot be given
webhook.readorwebhook.write. - Set up a sandbox's endpoints in the dashboard instead. A sandbox key can still ping and re-enable them.
| Operation | Permission |
|---|---|
List webhook endpointsGET/webhook-endpointswebhook.read | webhook.read |
Create a webhook endpointPOST/webhook-endpointswebhook.write | webhook.write |
Get a webhook endpointGET/webhook-endpoints/{endpoint_id}webhook.read | webhook.read |
Update a webhook endpointPATCH/webhook-endpoints/{endpoint_id}webhook.write | webhook.write |
Delete a webhook endpointDELETE/webhook-endpoints/{endpoint_id}webhook.write | webhook.write |
Rotate a webhook endpoint's signing secretPOST/webhook-endpoints/{endpoint_id}/rotate-secretwebhook.write | webhook.write |
Sandbox keys only
The test helpers under /v2/sandbox/ let you drive a flow end to end. They simulate deposits, payouts and a failing webhook endpoint, and read back the simulations. Calling one with a live key returns 404 environment_not_sandbox (not a sandbox environment). See Sandbox.
Retries and resets
Two more behaviours differ between the environments:
- Webhook retries. For an endpoint created through
/v2, live retries a failed delivery over about 72 hours, and the sandbox over about 2 hours 35 minutes. See Webhooks. - Resets. You can reset a sandbox in the dashboard. A reset deletes its data and keeps its keys and webhook endpoints. While it runs, every request for that sandbox returns
409environment_resetting. Live is never reset.
The Try it console
The Try it console on every operation page starts in Sandbox, so you can experiment without touching real money.
- Choosing Production asks you to confirm, and asks again after every reload, so you never send a live request by accident.
- Both modes call
api.stridge.com. The key you paste decides where the request acts. - The console refuses to send a live key under Sandbox, or a sandbox key under Production.