Guides

Sandbox & test data

Build and test against a full-fidelity environment with simulated rails, deterministic settlement, and on-demand scenario triggers.

What sandbox is

The AgentRail sandbox is a complete, isolated copy of the platform. The API surface is identical to production — same endpoints, same payloads, same error shapes. The only differences: no real money moves, and you can trigger any scenario on demand.

Funding test wallets

Sandbox wallets start with a zero balance. Credit them via the sandbox helper:

Python
await client.sandbox.wallets.credit(
    wallet_id=wallet.id,
    amount=1_000_000_00,  # $1,000,000.00
)

Simulating scenarios

  • sandbox.payments.simulate_failure — force a failure with a specific reason code.
  • sandbox.compliance.simulate_hit — trigger a sanctions screening hit.
  • sandbox.disputes.simulate_chargeback — file a dispute against a sandbox payment.
  • sandbox.webhooks.replay — replay any past webhook for testing your handler.
Note
Scenario triggers are sandbox-only. They're rejected with a clear error if you accidentally point a sandbox key at production.

Isolation guarantees

Sandbox and production are physically separate. Sandbox keys begin with ar_test_; production keys begin with ar_live_. You can't accidentally move sandbox funds into production or vice versa — the platform refuses the call at the credential boundary.