Sandbox and test mode
Sandbox mode lets you test with test currencies. No real funds are involved and no real transactions are processed. This page shows how to run safe test payments with the sandbox flag and the Sandbox API ID.
How sandbox mode works
Sandbox mode changes how you mark a request, not where you send it.
There is no separate sandbox URL. Sandbox and live requests use the same host, https://api.triple-a.io/api/v2, so what changes is how you mark the request. The table below shows how to use the sandbox with each endpoint.
| Endpoint | How to use sandbox |
|---|---|
| Make a payment request | Add "sandbox": true to the request body. |
| Make a payment request (specific account) | Pass your Sandbox API ID as {account_api_id} instead of your Live API ID. No sandbox flag is needed. |
The following request body marks a payment as a test payment. The highlighted line is the only difference from a live request.
{
"type": "triplea",
"merchant_key": "YOUR_MERCHANT_KEY",
"order_currency": "USD",
"order_amount": 10,
"sandbox": true
}Sandbox API IDs end in _t, for example HA123456789012_t. This is an example from the API reference and not a documented rule. Webhook notifications include an api_id field, so you can see which kind of account a payment used.
Test currencies
Sandbox mode uses testnet Bitcoin (testBTC). In sandbox payments, crypto_currency shows testBTC. Testnet assets have no real-world value.
To pay a test payment you need a testnet wallet and some testBTC. Follow these steps to get them.
- Install a testnet-capable wallet, such as Unisat.
- Create your wallet, open Settings, and switch the network to Bitcoin Test Network.
- Request testBTC from a faucet.
The table below lists faucets you can use.
| Faucet |
|---|
| CoinFaucet |
| Bitcoin Testnet Faucet |
| Bitaps |
| Kuttler |
Faucets run out from time to time and are usually refilled within a few days, so try another if one is empty. They limit how much you can request, so test with small amounts.
To pay a sandbox payment, send testBTC from your wallet to the crypto_address shown on the payment page, for the amount shown. This step isn’t confirmed yet, because the faucet instructions only describe copying the address and amount of the payment request into the faucet’s form.
Switch to live
Remove "sandbox": true from your requests, or use your Live API ID in Make a payment request (specific account). For the rest of the checklist, see Go live.
Next steps
These pages are the best places to go next.
- Your first payment to create a sandbox payment