What is the collection order lifecycle?
1
Order Created
Your server calls
POST /v1/order/createCollection with the amount, symbol, and chain. The gateway creates an order with status INIT and returns a unique deposit address and checkout URL.2
Awaiting Payment
The order moves to
PENDING. The customer sees the deposit address and a QR code on the checkout page. The order has a configurable expiry time.3
Transaction Detected
The blockchain scanner detects an incoming transaction matching the amount and deposit address. The status changes to
PENDING_CONFIRMATION. A webhook (ORDER_PENDING_CONFIRMATION) is sent with the transaction details.4
Confirmed
After the required number of block confirmations (configurable per chain), the order status changes to
SUCCESS. A webhook (ORDER_SUCCESS) is sent. The funds are now in your gateway hot wallet.5
Expired or Failed
If no payment arrives before the expiry time, the order status moves to
EXPIRED. If the transaction fails validation, it moves to FAILED.What order statuses does XPayLabs use?
How do collections flow from server to blockchain?
PaymentAddress Object
When you create a collection, the gateway returns aPaymentAddress object:
Amount Format
All amounts are string-formatted decimals (e.g.,"100.00"). This avoids floating-point precision issues common in JavaScript when dealing with large numbers.

