Guides
Testing
Testnets run side by side with mainnet. Build and test with free test coins using the exact same API, then switch the currency codes when you go live.
Testnets#
There's no separate sandbox or test key: testnet coins are just different currency codes. Use them with your normal API key; testnet payments are flagged testnet: true and credit separate testnet balances.
| Currency code | Network | Get test coins |
|---|---|---|
BSC_TESTNET_USDT | BNB Smart Chain Testnet | BNB Chain testnet faucet (search “BNB Smart Chain faucet”) |
BSC_TESTNET_BNB | BNB Smart Chain Testnet | BNB Chain testnet faucet (search “BNB Smart Chain faucet”) |
ETH_SEPOLIA_ETH | Ethereum Sepolia Testnet | Any Sepolia faucet |
TRON_NILE_USDT | Tron Nile Testnet | Nile testnet faucet (nileex.io) |
TRON_NILE_TRX | Tron Nile Testnet | Nile testnet faucet (nileex.io) |
Test a payment end to end
{ "order_id": "test_001", "order_name": "Test order", "amount": "5", "currency": "USD", "accepted_currencies": [ "BSC_TESTNET_USDT", "BSC_TESTNET_BNB", "ETH_SEPOLIA_ETH" ], "fee_payer": "customer"}- Open the
payment_url, pick a coin and send the exact amount from a test wallet. - Watch it move through
confirmingtopaidand receive the webhook. - Try sending less than requested to see
underpaid, then accept or refund it. - In the dashboard, turn on Show testnet (top bar) to see testnet payments, payouts and balances. When it's off they're hidden, not deleted.
Testnet stablecoins have no official contract, so only the test tokens listed above are accepted. A payment can't mix testnet and mainnet codes.
Go-live checklist#
- Created a payment with a testnet code and paid it from a test wallet; the order was fulfilled from the payment.paid webhook, not the redirect.
- Your webhook handler verifies JagPay-Signature against the raw body and ignores duplicate delivery IDs.
- Underpaid and late payments are handled (accept or refund), or your team watches for the dashboard / email alerts.
- Every create call sends a unique order_id, and timeouts are retried with the same order_id.
- Payouts: 2FA is on, the payout signing secret is in your secret manager, and you simulate before large payouts.
- API keys, webhook secret and payout signing secret live only on your server; nothing is in client code or git.
- You switched the codes to mainnet (e.g. BSC_TESTNET_USDT → BSC_USDT) and created production keys.
