Test scenarios in sandbox
Sandbox runs the same payment and compliance flow as production, but no money moves. You trigger the events that would normally come from outside (an incoming deposit, an on-chain transfer), and a sandbox reviewer makes the decisions Stables compliance makes in production.
You choose the outcome with a scenario on the simulate request, or with test values the way you would use test card numbers: the amount of a payment, the sender wallet of a deposit, or a tag in a customer's email.
The sandbox reviewer waits a few seconds before it decides, so you can see the held state first. Listen for webhooks or poll the resource rather than expecting the final status in the simulate response.
Scenarios at a glance
| Area | Test value | Outcome |
|---|---|---|
| Transfer | Simulate the deposit with scenario: completed (default) | Completes |
| Transfer | Simulate the deposit with scenario: rfi_approved | Held with a source-of-funds RFI. Approved once you answer it, then completes |
| Transfer | Simulate the deposit with scenario: rfi_rejected | Held with a source-of-funds RFI. Rejected once you answer it, and the transfer fails |
| Transfer or payment route | Worth USD 1313.00 to 1313.99 | Held with a source-of-funds RFI. Approved once you answer it, then completes |
| Transfer or payment route | Worth USD 1314.00 to 1314.99 | Held with a source-of-funds RFI. Rejected once you answer it, and the payment fails |
| Payment route deposit | scenario: completed, failed or create_only | Deposit paid out, failed, or recorded as pending |
| Balance deposit | Sender is a whitelisted wallet | Credited |
| Balance deposit | Sender is not whitelisted | Held for review, then approved and credited |
| Balance deposit | Sender address ends in dead | Held for review, then rejected. Nothing is credited |
| Balance whitelisted wallet | Wallet label contains +reject | Rejected by review. Any other label is approved |
| Balance withdrawal | Any | Waits for approval in the dashboard, as in production |
| Customer verification | Email local part contains +kyc_retry or +kyc_reject, for example [email protected] | A verification waiting for review is sent back for resubmission, or rejected. With any other email it is approved |
For document-based verification outcomes, see Sandbox Test Documents.
Transfers
Simulate the deposit
After you create a transfer, it waits for the customer's deposit. Simulate that deposit to start processing:
POST /api/v1/transfers/{transferId}/sandbox/simulate-deposit| Field | Type | Required | Description |
|---|---|---|---|
scenario | string | No | completed (default), rfi_approved or rfi_rejected. See Test an RFI. |
from_address | string | No | Sender wallet of the simulated crypto deposit. Used by the Travel Rule check on offramps. |
The request needs an Idempotency-Key header. A 202 response means the deposit was accepted:
{
"transfer_id": "8f0f6c1e-...",
"simulation_id": "2b7d9a40-...",
"scenario": "completed",
"deposit_status": "completed"
}curl -X POST "https://api.sandbox.stables.money/api/v1/transfers/{transferId}/sandbox/simulate-deposit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "scenario": "rfi_approved" }'Things to know:
- The deposit is always for the transfer's full amount. You cannot simulate an under- or over-payment.
- You can simulate a deposit once, while the transfer is still waiting for it. A second call, or a call on a transfer that has moved on, returns
409. - A transfer paid from your balance is funded when you create it, so there is no deposit to simulate and no scenario to pick.
- After the deposit, conversion and payout always succeed in sandbox. The only way to make a transfer fail is an RFI that is rejected.
Offramps: the sender wallet
On an offramp, Stables runs a Travel Rule check against the wallet the crypto came from. If you leave from_address out, sandbox uses a sender wallet shaped for the deposit's network, so the check can pass. Pass from_address when you want to test with a specific wallet.
Test an RFI
Pick the outcome when you simulate the deposit:
- Create a transfer of any amount, funded by a deposit.
- Simulate the deposit with
"scenario": "rfi_approved"(to test approval) or"scenario": "rfi_rejected"(to test rejection). The transfer is held: itscompliance_holdobject names the RFI and its outstanding requirements, and you receiverfi.createdandtransfer.action_required. - Read the RFI with Get RFI and answer each requirement with Submit Evidence.
- A few seconds after the RFI reaches
submitted, the sandbox reviewer decides it. Withrfi_approvedthe RFI is approved and the transfer completes. Withrfi_rejectedit is rejected (final) and the transfer fails.
You can also choose the outcome with the amount. A transfer worth USD 1313.00 to 1313.99 when you create it is held and approved the same way, and one worth USD 1314.00 to 1314.99 is held and rejected, even if you simulate its deposit with completed. For USDC, USDT or USD, that is the amount you send. For other currencies, choose an amount whose USD value at the current rate lands in the middle of the range.
The reviewer only decides RFIs you have answered. An RFI you leave open stays open. See Requests for Information for the full RFI flow.
If an RFI scenario completes without an RFI, transaction risk checks are switched off for your sandbox organization. Contact [email protected] to switch them on.
Payment routes (virtual accounts)
Simulate an incoming bank deposit with:
POST /api/v1/customers/{customerId}/payment-routes/{virtualAccountId}/sandbox/simulate-depositSee Setup a sandbox environment for the request fields. The scenario field picks the outcome:
scenario | Outcome |
|---|---|
completed (default) | The deposit is recorded and paid out to the payment route's destination |
failed | The deposit is recorded and its collection fails |
create_only | The deposit is recorded and left pending; nothing is paid out |
Things to know:
completedandfailedrun the payout flow, so they need a virtual account that pays out automatically.create_onlyworks on any virtual account.- The RFI ranges apply to deposits too. They are checked against the full deposit amount in USD, before fees.
Balance
Fund your balance without an on-chain transfer:
POST /api/v1/prefund/wallet/{network}/sandbox/simulate-deposit| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount in major units, for example "250" or "250.5". At most 6 decimal places. |
currency | string | Yes | USDC or USDT. Tron holds USDT only. |
sender_address | string | No | On-chain sender. Defaults to your first active whitelisted wallet on the network. |
tx_hash | string | No | Transaction hash to record. Defaults to a new one on each call. |
The sender decides what happens:
- Whitelisted wallet (or
sender_addressleft out while you have one): credited. - Wallet that is not whitelisted: held for review, then approved and credited a few seconds later. If you have no whitelisted wallet on the network and leave
sender_addressout, this is what happens. - Address ending in
dead: held for review, then rejected. Nothing is credited.
A 202 response returns the deposit_id that the ledger entry and webhooks carry:
{
"deposit_id": "...",
"tx_hash": "...",
"workflow_id": "...",
"status": "started"
}curl -X POST "https://api.sandbox.stables.money/api/v1/prefund/wallet/polygon/sandbox/simulate-deposit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "amount": "1000", "currency": "USDC" }'Things to know:
- You need an active deposit wallet on the network first. Without one, the call returns
409with codePREFUND_WALLET_NOT_ACTIVE. See Balance Deposit Wallet. - Sending the same
tx_hashagain is idempotent: the response hasstatus: "duplicate"and the original deposit is reused. - Withdrawals are never approved automatically. Approve them in the dashboard, as in production.
In the dashboard
The same simulations are available in the sandbox dashboard:
- Transfers: open a transfer that is waiting for its deposit, click Simulate deposit, and choose Completes, RFI → approved or RFI → rejected. Transfers paid from your balance don't show it.
- Payment routes: open a virtual account and use the Simulate tab.
- Balances: go to Add funds, pick the coin and network, click Simulate deposit under the deposit address, and enter an amount. The dashboard credits the deposit from your first whitelisted wallet; to test review outcomes, call the API with
sender_address.
If you don't see these buttons, ask an admin of your organization for permission to simulate sandbox deposits.