Skip to main content

Crypto Pay-Out

TOPPAY TeamAbout 4 min

Overview

The Crypto Pay-Out API transfers digital currency from the merchant balance to a specified on-chain address. Once accepted, the order enters the "order received (processing)" state; the platform notifies the merchant of the final result via callback after settlement.

Rely on the asynchronous result

A successful order creation only means the request was accepted. The response always returns status = 1 (order received, processing) and the platform then initiates the on-chain transfer, so the order response cannot be used to determine the payout result. Rely on the callback or the inquiry endpoint.

Common request headers (including the mandatory Nonce), common body fields and the unified response envelope are described in Crypto Integration Overview.


Request path

Domain: Prefer unified host openapi.toppayment.com (path unchanged); legacy crypto domain (global-digit-openapi.toppayment.com) remains available.

EnvironmentURL
Sandboxhttps://openapi.toppayment.com/crypto/sandbox/disbursement/cash
Productionhttps://openapi.toppayment.com/crypto/disbursement/cash

Request headers

FieldRequiredTypeDescription
Content-TypeMStringFixed value: application/json
NonceMString(16-64)Anti-replay random string, unique within 10 minutes, excluded from the signature

IP whitelist

Pay-out endpoints are protected by an egress IP whitelist. Submit your egress IP to support in advance, otherwise 1001 (IP whitelist exception) or 1004 (IP whitelist not configured) is returned.

Request body

FieldRequiredTypeDescription
mchNoMString(32)Merchant number
In sandbox use the SD-prefixed sandbox merchant number
orderNumMString(64)Merchant order number
Must be unique per merchant; duplicates return 0001
moneyMStringPayout quantity
Numeric string with at most 6 decimal places
Example: 10.5
currencyMString(16)Coin
Charset A-Z a-z 0-9 _, example: USDT
netWorkMString(100)Chain network
Example: TRC20
Must match the chain that inAddress belongs to
inAddressMString(255)Beneficiary address
Validate the format and chain before submitting
feeTypeMStringFee bearer
0: fee deducted from the payout quantity, beneficiary receives money - fee
1: fee charged separately, the account is debited money + fee and the beneficiary receives money
downNotifyUrlMString(255)Asynchronous notification URL
Must be a publicly reachable HTTP/HTTPS URL, see Callback
timestampMString(13)Request timestamp (13-digit milliseconds), within ±5 minutes
signMStringSignature, see Signature
nameOString(64)Beneficiary name
emailOString(64)Beneficiary email
phoneOString(32)Beneficiary phone
tenantCodeOString(32)Sub-tenant code, defaults to the default tenant
countryCodeOString(16)Country code, not needed for crypto

feeType explained

Using money = 100 and fee = 1:

feeTypeAccount debitedBeneficiary receivesUse case
010099Fee borne by the beneficiary
1101100Fee borne by the merchant, so the beneficiary receives a round amount

fee is derived from the merchant fee template (fixed fee + rate × quantity). The authoritative value is the fee returned in the order response and callback. If no fee template or channel matches, 0003 is returned.

Request example

Content-Type: application/json
Nonce: c41f7ae9028b56d3f1a4

Response body

FieldRequiredTypeDescription
successMBooleanWhether the request succeeded
codeMStringResponse code
9999: success; otherwise see Exception Codes
msgOStringResponse message, null on success
timeStampMNumberServer response time (milliseconds)
dataMObjectResponse payload
orderNumMStringMerchant order number
platOrderNumMStringPlatform order number
The key used for later inquiries and callbacks
amountMNumberPayout quantity, equal to the request money
feeMNumberFee
feeTypeMNumberFee bearer
0: deducted from the payout quantity; 1: charged separately
statusMNumberOrder status code
Always 1 (order received, processing) on successful creation; see the table below
statusMsgMStringStatus description
Order creation and inquiry return the unified display status (e.g. PENDING)
Callbacks return the detailed status (e.g. ORDER_RECEIVED_PROCESSING); the two value sets differ
currencyMStringCoin
netWorkMStringChain network

Pay-out status codes

statusDetailed status (callback statusMsg)Unified display status (order/inquiry statusMsg)DescriptionFinal
0INITIAL_STATE_PENDING_ORDERSPENDINGInitial state (awaiting acceptance)No
1ORDER_RECEIVED_PROCESSINGPENDINGOrder received (processing)No
2PROCESSED_SUCCESSFULLYSUCCESSPayout succeededYes
3CANCELED_SUCCESSFULLYCANCELLEDCancelled (funds unfrozen and returned)Yes
4PROCESSING_FAILEDFAILEDPayout failed (funds unfrozen and returned)Yes
5LOANINGPROCESSINGOn-chain transfer in progressNo
99PENDING_ORDERPENDINGAwaiting acceptanceNo

Two sets of statusMsg values

The same status yields different statusMsg wording depending on the endpoint: order creation and inquiry return the unified display status (PENDING / PROCESSING / SUCCESS / FAILED / CANCELLED), while callbacks return the detailed status (ORDER_RECEIVED_PROCESSING, PROCESSED_SUCCESSFULLY, etc.). Base your business logic on the numeric status and treat statusMsg as display/logging only.

Response example

{
    "success": true,
    "code": "9999",
    "msg": null,
    "timeStamp": 1767840272829,
    "data": {
        "orderNum": "CW1788506801001",
        "platOrderNum": "CW20260825143024553",
        "amount": 10.500000,
        "fee": 0.700000,
        "feeType": 0,
        "status": 1,
        "statusMsg": "PENDING",
        "currency": "USDT",
        "netWork": "TRC20"
    }
}

Notes

Address and network must match

inAddress and netWork must belong to the same chain. A cross-chain address makes the assets unrecoverable and the platform cannot retrieve funds sent to a wrong address. Validate the address format before submitting.

  • A successful order immediately freezes the corresponding balance (including the fee); the freeze is released automatically on cancellation or failure.
  • Insufficient balance returns 1002. In sandbox, money = 20000000 reliably triggers this error for testing.
  • Reusing the same mchNo + orderNum returns 0001 (The order already exists!); concurrent duplicate submissions return 0004.
  • The order response only means the request was accepted. Rely on the Callback or Order Inquiry for the final result.

Next steps