Skip to main content
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?

  1. Your server creates a collection order via the API.
  2. The gateway returns a unique deposit address and checkout URL.
  3. Your customer sends USDT (or another supported token) to the deposit address.
  4. The blockchain scanner detects the transaction.
  5. 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:
ChainValueTokens
TRONTRONUSDT (TRC20), USDC
EthereumETHUSDT (ERC20), USDC, DAI
BNB ChainBSCUSDT (BEP20), USDC, BUSD
PolygonPOLYGONUSDT, USDC, DAI
AvalancheAVAX_C_CHAINUSDT, USDC
SUISUIUSDC
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