Integrating Order Payment
This article will help you quickly run through the W Checkout order payment process to verify functionality and ensure the integration works correctly.1. Open the Payment Page#
The payment page can be flexibly integrated, supporting optional configuration of pages, logos, theme colors, etc.
Two access methods are supported:In-App Embedding: Open the W Checkout payment page via WebView within a mobile App.
Browser Access: Directly access the payment page link in a browser.
2. Create an Order and Pass Parameters#
The client system needs to call CreateCheckoutOrder to generate an order, then open the returned W Checkout payment page:| Parameter Name | Type | Required | Description |
|---|
| orderNo | String | Yes | Unique order number generated by the client system to identify the payment order. |
| customerId | String | Yes | Unique ID of the paying user in the client system. |
| merchantId | String | Yes | Unique ID of the merchant receiving payment in the client system. |
| orderAmount | Number | Yes | Product order amount in USD. Will be converted to the user-selected stablecoin amount based on the real-time exchange rate. |
| token | String | Yes | The token selected by the user for payment, e.g., ETH_USDT. |
| expiredIn | Number | No | Payment order expiration time (in seconds), counted from creation. The order status will change to "Expired" after the timeout. |
3. Information Displayed on Payment Page#
After the order is created, the payment page will automatically display the following information:Payable Amount (payableAmount)
The stablecoin amount calculated based on the order amount and the real-time exchange rate.
Deposit Address (depositAddress)
A generated receiving address based on the user-selected blockchain and stablecoin.
4. User Payment#
Users can complete the payment in the following ways:Connect Wallet (e.g., MetaMask, TronLink, etc.) directly on the payment page and transfer;
Or Copy the Deposit Address and perform a manual transfer using their wallet.
W Checkout will automatically detect incoming transactions to the target address on-chain and update the order status.
5. Retrieve Order Status#
Clients can obtain the order payment result through the following two methods:After configuring the Webhook URL, the system will push notifications when the order status changes.
It is recommended to implement idempotent handling to ensure repeated notifications do not affect business logic.
Call the GetCheckoutOrderInfo interface to proactively query the payment order status.
Modified at 2026-01-20 03:13:28