Test your XPayLabs integration using blockchain testnets before processing real mainnet transactions. Testnet networks simulate the real blockchain environment without using real funds.Documentation Index
Fetch the complete documentation index at: https://docs.xpaylabs.com/llms.txt
Use this file to discover all available pages before exploring further.
Supported Testnets
| Testnet | Chain Value | Faucet |
|---|---|---|
| TRON Shasta | TRON_TEST | TRON Shasta Faucet |
| Ethereum Sepolia | ETH_SEPOLIA | Sepolia Faucet |
| BSC Testnet | BSC_TEST | BSC Testnet Faucet |
| Polygon Amoy | POLYGON_AMOY | Polygon Faucet |
| Avalanche Fuji | AVAX_FUJI_TEST | Avalanche Faucet |
| SUI Testnet | SUI_TEST | SUI Faucet |
Configuration
Configure testnet RPC endpoints in your gateway configuration:Testing the Full Flow
1. Get Test Tokens
Visit the faucet for your chosen testnet and request test USDT or native tokens (TRX, ETH, BNB). You’ll need:- Native gas tokens (TRX, ETH, BNB) to pay blockchain fees
- Test USDT to simulate customer payments
2. Create a Test Collection
3. Send Test USDT
Send the exact amount of test USDT to the deposit address returned in the response. For TRON Shasta:- Use a test wallet (e.g., TronLink on Shasta network)
- Send test USDT from a faucet or another test wallet
4. Verify the Webhook
Your configured webhook endpoint should receive events:ORDER_PENDING— Order createdORDER_PENDING_CONFIRMATION— Transaction detected (within seconds)ORDER_SUCCESS— Payment confirmed
5. Test a Payout
Testing Edge Cases
| Scenario | How to Test |
|---|---|
| Expired order | Create a collection and wait for the expiry time |
| Wrong amount | Send a different amount than requested (less than or more than) |
| Wrong token | Send a different token to the deposit address |
| Invalid payout address | Use an address from a different chain |
| Insufficient balance | Try to create a payout larger than your wallet balance |
| Duplicate nonce | Send the same request twice with the same nonce |
Going Live
When your integration is working correctly on testnet:- Configure mainnet RPC endpoints in the gateway configuration.
- Switch chain values from testnet (e.g.,
TRON_TEST) to mainnet (e.g.,TRON). - Fund your gateway hot wallet with real tokens and gas.
- Test with a small real transaction before scaling up.

