Skip to main content

Sandbox & Testing

The sandbox is a complete copy of the StablePay API for building and testing your integration. It behaves exactly like production — same endpoints, same request/response shapes — but nothing is real: no money moves, no payouts are sent, no live KYC/AML checks run. Every outcome is deterministic, so you can test success and failure paths reliably.
Sandbox keys are prefixed pk_sandbox_ and production keys pk_live_. A sandbox key only works against the sandbox URL, and vice-versa. StablePay issues your sandbox key — reach out to get one for your account.

Test values

Drive specific outcomes with these inputs:
The payout outcome keys off the cents of the amount you send (the USD deposit amount for a sell, or the INR amount for a payout) — not the converted total, which depends on the live rate.

Simulating a deposit

In production, a sell transaction waits for the user’s on-chain crypto deposit. The sandbox has no real blockchain, so you trigger the deposit yourself with a sandbox-only endpoint. It drives the transaction through its full lifecycle — deposit detected → confirmed → converted → paid out — firing the same webhooks production would.
id
string
required
The transaction ID returned by POST /v2/transactions.
amount
string
Override the deposit amount. Defaults to the transaction’s expected amount.
confirmations
number
Confirmations to report. Defaults high enough to confirm immediately; pass a low number to leave the deposit merely detected (unconfirmed).
autocomplete
boolean
When true (default), drives the transaction all the way to a terminal payout. Set false to stop at deposit_confirmed. No-op for pre_settlement transactions, whose payout already fired at creation.
This endpoint exists only in the sandbox, and only supports sell / pre_settlement deposit flows. For payout-type transactions there is no deposit to simulate — they pay out immediately on creation.
Pool settlement: simulate-deposit does not drive pool_settlement transactions and will return Could not match a pending deposit for this transaction. In the sandbox their deposit is confirmed automatically at creation — call POST /v2/transactions/{id}/payout directly to settle them.

End-to-end walkthrough

A full offramp in the sandbox, using the sell flow:
Once you’re confident, switch the base URL to https://api.stablepay.global and your pk_live_ key — no other code changes are needed.