Sandbox
Every workspace has a sandbox where you can build and test without moving real money. It runs on simulated chains and serves the same operations, with the same request and response shapes, as live. Code you write against the sandbox runs unchanged in live.
Keys and base URL
Switching to the sandbox only takes a different key. Use a sandbox key, which starts with sk_sbx_, against the same base URL as live:
curl "https://api.stridge.com/v2/deposits" \
-H "Authorization: Bearer $STRIDGE_SANDBOX_KEY"The key alone decides the environment. Create sandbox keys in the dashboard. Unlike a live key, a sandbox key's secret can be revealed again there. See Environments and Authentication.
A sandbox key calls the same operations as a live key, with two differences:
- Test helpers work only with a sandbox key. See Test helpers.
- Webhook endpoint configuration (listing, reading, creating, updating and deleting endpoints, and rotating their secrets) is served to live keys only. Calling one with a sandbox key returns
404operation_not_served, and a sandbox key cannot be created withwebhook.readorwebhook.write. Manage sandbox endpoints in the dashboard instead. A sandbox key withwebhook.delivercan still ping and re-enable them. See Webhooks.
Telling sandbox data apart
Check livemode before you write anything to a live system. Every object a sandbox request returns carries "livemode": false, and live objects carry true. Sandbox webhook events carry livemode: false too.
On an endpoint created before thin events, the event body also carries the sandbox's environment_id and a reset_epoch: the sandbox's reset count when the attempt was sent. An event with a lower reset_epoch than the sandbox's latest describes data that a reset has since deleted.
What is simulated
The sandbox behaves like live, but nothing in it is worth anything:
- Chains. The sandbox's networks are simulated chains.
GET /v2/sandbox/test-helpers/optionslists the networks your sandbox simulates and the assets on each. A helper aimed at any other network returns404network_not_simulated. - Prices. Quotes and USD amounts use real market prices.
- Money. Nothing on a simulated chain has value, and nothing leaves the sandbox. Deposits arrive only when you simulate them.
Test helpers
Test helpers make things happen that would otherwise need a real chain or days of waiting:
- a deposit arriving at an address;
- a payout succeeding, failing or being held;
- a webhook endpoint failing.
They exist only in the sandbox. Calling one with a live key returns 404 environment_not_sandbox.
The helpers follow these rules:
Idempotency
400header_invalid
Every helper that simulates a deposit or drives a payout requires an Idempotency-Key. Without one, it returns 400 header_invalid. A retry with the same key returns the first result and uses nothing from the budget. The webhook endpoint helper accepts a key but does not require one. See Idempotency.
Permissions
403permission_denied
Each helper needs a permission on the key:
sandbox.simulateto simulate deposits;payout.createto simulate, release and fail payouts;simulation.readto read the options and the simulations;webhook.deliverto move an endpoint'sfailing_since.
A call from a key without the permission returns 403 permission_denied.
Budget
429simulation_budget_exhausted
Each sandbox can start 600 simulations per clock hour, shared by every key and person working in it. The options' budget shows what is left. Once it is spent, the helpers return 429 with simulation_budget_exhausted and a Retry-After header until the next hour begins.
Webhooks
A simulation sends the same webhook events a real flow would, such as deposit.confirmed, uda.settlement.completed or payout.failed, to your sandbox webhook endpoints.
For presets such as an underpaid or wrong-network deposit, and for worked examples, see the test helpers guide.
Resets
Reset your sandbox from the dashboard to start over with a clean slate. A reset:
- deletes everything in the sandbox, including routing policies and treasuries;
- keeps its API keys, webhook endpoints and signing secrets.
While a reset runs, requests with that sandbox's keys return 409 environment_resetting. A sandbox nobody uses for 30 days is reset automatically. See Sandbox resets.
Sandbox explorer
Transactions, addresses and blocks on the simulated chains exist only in Stridge, so public block explorers cannot find them. Look them up in the sandbox explorer (opens in a new tab) instead. The dashboard opens the explorer signed in to your workspace, and the scanner_url on sandbox deposits links straight to it.
scanner_url is an empty string when no explorer is available for a transaction. Render the link only when the field is non-empty.