Accept stablecoin payments with XPayLabs by creating a collection order, presenting the checkout page to your customer, and confirming payment via webhook. TRON transactions confirm in ~3 seconds; EVM chains in ~12-15 seconds.
How does the crypto payment flow work?
- Your server creates a collection order via the API.
- The gateway returns a unique deposit address and checkout URL.
- Your customer sends USDT (or another supported token) to the deposit address.
- The blockchain scanner detects the transaction.
- The gateway sends a webhook to your server when payment is confirmed.
Step 1: Create a Collection Order
Call POST /v1/order/createCollection with the payment details:
Response
Step 2: Present the Payment to Your Customer
Direct your customer to the paymentUrl — a hosted checkout page that displays the deposit address, QR code, and payment instructions. Or embed the address directly in your own interface:
Step 3: Handle the Webhook Notification
Configure your callback URL in the gateway. When payment is detected and confirmed, the gateway sends a signed POST request:
Step 4: Poll Order Status (Alternative to Webhooks)
If you cannot receive webhooks, poll the status endpoint:
Supported Chains
When creating a collection, specify the chain parameter:
| Chain | Value | Tokens |
|---|
| TRON | TRON | USDT (TRC20), USDC |
| Ethereum | ETH | USDT (ERC20), USDC, DAI |
| BNB Chain | BSC | USDT (BEP20), USDC, BUSD |
| Polygon | POLYGON | USDT, USDC, DAI |
| Avalanche | AVAX_C_CHAIN | USDT, USDC |
| SUI | SUI | USDC |
During development, use testnet chains (e.g., TRON_TEST for Shasta, ETH_SEPOLIA for Sepolia) to avoid real gas costs. See the Testing guide for details. Last modified on June 26, 2026