Creates a new collection order. The gateway generates a unique deposit address for the specified blockchain and token. Your customer sends funds to this address, and the blockchain scanner detects the transaction automatically.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.
Request
POST http://your-gateway:3010/v1/order/createCollection
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
Body Parameters (data field)
The payment amount as a decimal string, e.g.
"100.00". Must be greater than zero.The token symbol to accept, e.g.
"USDT". Must be a supported symbol on the specified chain.The blockchain network:
TRON— TRC20 tokens (USDT, USDC)ETH— Ethereum ERC20BSC— BNB Smart Chain BEP20POLYGON— PolygonAVAX_C_CHAIN— Avalanche C-ChainSUI— SUI Network
Your unique order identifier. Required for V3 merchants. Used to correlate the collection with your internal order system.
Your internal user identifier. Required for V2 merchants. Cannot be
"0".cURL
Node.js
Response
A successful request returns HTTP200 with the R<PaymentAddress> envelope.
PaymentAddress Object
The generated deposit address where the customer sends funds. Example:
"TWkKZkmuB8DpVeiMoHiKf99ZoFHzk73CqR".The collection amount as a decimal string. Matches the request amount.
The token symbol for this collection. Example:
"USDT".The blockchain network. Example:
"TRON".Your order identifier, echoed back from the request.
Your user identifier, echoed back from the request.
Unix timestamp when this collection expires. After expiry, the deposit address is no longer valid for new transactions.
URL to the hosted checkout page where the customer can view payment instructions and a QR code.
Example Response
Error Responses
400 — Validation Error
| Message | Cause |
|---|---|
"The amount cannot be left blank." | amount is missing or null |
"The symbol cannot be left blank." | symbol is missing or empty |
"The chain cannot be left blank." | chain is missing or invalid |
"The orderId cannot be left blank." | orderId is required for V3 merchants but missing |
"The uid cannot be left blank." | uid is required for V2 merchants but missing |
"The uid cannot be zero." | uid is set to "0" |

