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

ParameterTypeRequiredDescription
amountStringNoPayment amount. If empty, it means the payment amount is not fixed.
tokenNameStringYesName of the cryptocurrency to be paid, e.g., USDT, BTC.
chainNameStringYesName of the blockchain network, e.g., Ethereum, Bsc.
businessIdStringNoMerchant-defined unique order ID, supporting alphanumeric characters (max length: 32).
timestampLongYesUNIX timestamp (in milliseconds).
displayInfoStringNoMerchant-defined description for the order, displayed on the payment page for user reference.
autoReturnStringNoWhether to automatically redirect to the merchant page after successful payment. Default: False.
returnUrlStringNoURL to redirect to after payment completion. Must start with http or https.
expiryMinutesStringNoOrder expiration time (in minutes). Default: 1 hour. Minimum: 1 minute. Maximum: 5 days.
webhookUrlStringNoCallback URL for payment completion, overriding the globally configured merchant callback.
displayLanguageStringNoDisplay language for the payment page. Default: en-US. Supported: zh-CN, en-US.

Response Parameters

ParameterTypeRequiredDescription
redirectUrlStringYesRedirect URL for the payment page.
statusStringYesStatus of the order.
idStringYesPlatform-defined order ID.
amountStringNoPayment amount (only if a fixed amount is set).
minAmountStringNoMinimum payment amount (only for variable-amount orders).
tokenNameStringYesCryptocurrency for payment.
chainNameStringYesBlockchain name.
addressStringYesRecipient address.
businessIdStringNoMerchant-defined business ID.
returnUrlStringNoMerchant-defined return URL.
displayInfoStringNoMerchant-defined display information.
createdDateLongYesOrder creation time (UTC).
expiryDateLongYesOrder 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"
    }
}