Skip to main content

Crypto Order Inquiry

TOPPAY TeamAbout 3 min

Overview

The order inquiry API actively retrieves the latest status, fee and on-chain details of a crypto pay-in or pay-out order. Pay-in and pay-out are separate endpoints that share the same request body but return different payloads.

Recommended usage

Use the Callback as the primary source of status changes and treat inquiry as a reconciliation fallback when a callback is lost. Avoid high-frequency polling (an interval of at least 5 seconds is recommended).

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.

ScenarioEnvironmentURL
Pay-in inquirySandboxhttps://openapi.toppayment.com/crypto/sandbox/pay/query
Pay-in inquiryProductionhttps://openapi.toppayment.com/crypto/pay/query
Pay-out inquirySandboxhttps://openapi.toppayment.com/crypto/sandbox/disbursement/query
Pay-out inquiryProductionhttps://openapi.toppayment.com/crypto/disbursement/query

Request headers

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

Request body

Pay-in and pay-out inquiries share the same request parameters.

FieldRequiredTypeDescription
mchNoMString(32)Merchant number
In sandbox use the SD-prefixed sandbox merchant number
timestampMString(13)Request timestamp (13-digit milliseconds), within ±5 minutes
signMStringSignature, see Signature
orderNumCString(64)Merchant order number
platOrderNumCString(64)Platform order number
tenantCodeOString(32)Sub-tenant code, defaults to the default tenant
countryCodeOString(16)Country code, not needed for crypto

One of the two order numbers is required

At least one of orderNum and platOrderNum must be provided; omitting both returns 0001 (orderNum or platOrderNum required). When both are provided, platOrderNum takes precedence. A non-existent order returns 0006.

Request example

Content-Type: application/json
Nonce: 5d8b3f1c74a920e6b8c3

Pay-in inquiry response

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
payMoneyMNumberCollection quantity
feeONumberFee
null when no fee has been incurred yet (e.g. unpaid order)
currencyOStringCoin
null in cashier mode before the payer selects a coin
netWorkOStringChain network, same as above
inAddressOStringDeposit address
null when not yet assigned
statusMStringOrder status, see the table below

Pay-in status values

statusDescriptionFinal
WAITINGAwaiting payment (includes order processing and created-but-unpaid)No
SUCCESSCollected successfully, funds creditedYes
FAILEDOrder creation failedYes
EXPIREDOrder expired (unpaid beyond expiryPeriod)Yes

Difference from the callback status

The inquiry endpoint returns the unified display status (WAITING / SUCCESS / FAILED / EXPIRED), whereas the pay-in callback returns the detailed order status (INIT_ORDER / NO_PAY / SUCCESS / PAY_ERROR, etc.). The two value sets differ, so handle them separately. See Callback.

Response example

{
    "success": true,
    "code": "9999",
    "msg": null,
    "timeStamp": 1767873172906,
    "data": {
        "orderNum": "CR1788506800926",
        "platOrderNum": "CR20260904152640640",
        "payMoney": 10.500000,
        "fee": 1.100000,
        "currency": "USDT",
        "netWork": "TRC20",
        "inAddress": "TP5wzCqNsJFNT83m1VXdF2Aj1ageFWgqW2",
        "status": "SUCCESS"
    }
}

Pay-out inquiry response

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
amountMNumberPayout quantity
feeMNumberFee
feeTypeMNumberFee bearer
0: deducted from the payout quantity; 1: charged separately
statusMNumberOrder status code, see Pay-out status codes
statusMsgMStringUnified display status
PENDING / PROCESSING / SUCCESS / FAILED / CANCELLED
currencyMStringCoin
netWorkMStringChain network

Response example

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

Reconciliation guidance

  • Use platOrderNum as the reconciliation primary key; orderNum is only unique within a merchant.
  • Stop polling only on a final status: pay-in SUCCESS / FAILED / EXPIRED, pay-out status of 2 / 3 / 4.
  • Start inquiry-based compensation only after the expected callback window elapses, and make your handler idempotent to avoid double processing.

References