Endpoint
POST /v1/account/payment
Payment orders can be created as either fixed-amount or variable-amount orders. If the amount
is provided, it is a fixed-amount order; otherwise, it is a variable-amount order where the user can decide the payment amount. You can choose the type based on your business requirements.
Request Parameters
Parameter | Type | Required | Description |
---|
amount | String | No | Payment amount. If empty, it means the payment amount is not fixed. |
tokenName | String | Yes | Name of the cryptocurrency to be paid, e.g., USDT , BTC . |
chainName | String | Yes | Name of the blockchain network, e.g., Ethereum , Bsc . |
businessId | String | No | Merchant-defined unique order ID, supporting alphanumeric characters (max length: 32). |
timestamp | Long | Yes | UNIX timestamp (in milliseconds). |
displayInfo | String | No | Merchant-defined description for the order, displayed on the payment page for user reference. |
autoReturn | String | No | Whether to automatically redirect to the merchant page after successful payment. Default: False . |
returnUrl | String | No | URL to redirect to after payment completion. Must start with http or https . |
expiryMinutes | String | No | Order expiration time (in minutes). Default: 1 hour. Minimum: 1 minute. Maximum: 5 days. |
webhookUrl | String | No | Callback URL for payment completion, overriding the globally configured merchant callback. |
displayLanguage | String | No | Display language for the payment page. Default: en-US . Supported: zh-CN , en-US . |
Response Parameters
Parameter | Type | Required | Description |
---|
redirectUrl | String | Yes | Redirect URL for the payment page. |
status | String | Yes | Status of the order. |
id | String | Yes | Platform-defined order ID. |
amount | String | No | Payment amount (only if a fixed amount is set). |
minAmount | String | No | Minimum payment amount (only for variable-amount orders). |
tokenName | String | Yes | Cryptocurrency for payment. |
chainName | String | Yes | Blockchain name. |
address | String | Yes | Recipient address. |
businessId | String | No | Merchant-defined business ID. |
returnUrl | String | No | Merchant-defined return URL. |
displayInfo | String | No | Merchant-defined display information. |
createdDate | Long | Yes | Order creation time (UTC). |
expiryDate | Long | Yes | Order expiration time (UTC). |
Response Example
{
"code": 200,
"msg": "success",
"timestamp": "1735119737092",
"data": {
"createdDate": 1735119737043,
"expiryDate": 1735123337038,
"redirectUrl": "https://pay.baaswallet.io/payin/d761cd01-04ab-45e1-b0a8-9e1bc7f84d8d",
"status": "Pending",
"id": "626945553984524288",
"amount": "99.99",
"tokenName": "USDT",
"chainName": "Ethereum",
"address": "0xE8f8f66DB0701a1cE1E2675F833859316C232bD5",
"businessId": "Bjxc6666",
"returnUrl": "",
"displayInfo": "Membership Service"
}
}