This guide walks you through the end-to-end order payment flow using ANexPay XCheckout, helping you validate functionality and ensure a smooth integration.1. Open Payment Page#
The checkout page is flexible and customizable, supporting optional branding such as logo and theme color.Two integration methods are supported:In-App (WebView)
Open the ANexPay XCheckout payment page within a mobile app using a WebView.
Browser Redirect
Redirect users to the payment page URL via a standard browser.
2. Create Order & Pass Parameters#
Your system must call the CreateCheckoutOrder API to generate an order, then redirect the user to the returned payment page.| Parameter | Type | Required | Description |
|---|
orderNo | String | Yes | Unique order ID generated by your system |
customerId | String | Yes | Unique user ID in your system |
merchantId | String | No | Merchant ID in your system (for multi-merchant scenarios) |
orderAmount | Number | Yes | Order amount in USD (converted to stablecoin in real-time) |
token | String | Yes | Payment token, e.g. ETH_USDT |
expiredIn | Number | Yes | Order expiration time (in seconds) |
3. Payment Page Display#
Once the order is created, the payment page will automatically display:Payable Amount (payableAmount)
The converted stablecoin amount based on real-time exchange rates.
Deposit Address (depositAddress)
A dynamically generated address based on the selected blockchain and token.
4. User Payment#
Users can complete the payment in the following ways:Connect Wallet
Use supported wallets (e.g., MetaMask) to initiate payment directly.
Manual Transfer
Copy the deposit address and transfer funds from any external wallet.
ANexPay XCheckout will automatically detect on-chain transactions sent to the deposit address and update the order status accordingly.
5. Retrieve Order Status#
You can obtain payment results through the following methods:Webhook Notification#
Configure a webhook endpoint to receive real-time order status updates
Recommended to implement idempotency handling to safely process duplicate notifications
API Query#
Call the GetCheckoutOrderInfo API to actively query the payment status
Best Practices#
Ensure order expiration (expiredIn) is set appropriately to avoid stale transactions
Always verify webhook signatures to ensure authenticity
Use both webhook + polling for higher reliability in production
Modified at 2026-03-30 18:37:24