On-ramp (Buy) APIs
Query order details
Code
Request Body
| Field | Type | Mandatory | Remarks |
|---|---|---|---|
| externalOrderId | string | Yes | The unique order id from the partner side. |
| language | string | No | Language code, which determines the multi-language of the content(if any, such as "payment method name") in the response data. If not passed, English is the default. The format is "LanguageCode-RegionCode", RegionCode is optional. |
Response Body
| Field | Type | Remarks |
|---|---|---|
| externalOrderId | string | The unique order id from the partner side. |
| type | int | 1: buy, 2: sell, 3: send* |
| status | int | Please refer to "Order status" |
| fiatCurrency | string | fiat currency |
| cryptoCurrency | string | crypto currency |
| openUserId | string | OpenUserId represents a Binance user ID that has been securely hashed. This field is provided to merchants to facilitate the identification of whether multiple orders originate from the same user. |
| fiatAmount | string | fiat amount |
| cryptoAmount | string | crypto amount |
| paymentMethod | object | payment method |
| feeAmount | string | total fee amount |
| feeCurrency | string | fee currency, fiat currency or crypto |
| revenueAmount | string | partner revenue amount |
| revenueCurrency | string | partner revenue currency, fiat currency or crypto |
| networkFee | string | network fee amount |
| withdrawWalletAddress | string | withdraw wallet address |
| withdrawNetwork | string | withdraw network |
| withdrawMemo | string | withdraw network memo |
| withdrawTxHash | string | withdraw tx hash |
| orderDetailLink | string | order detail link |
| orderTime | timestamp | order time |
| completionTime | timestamp | completion time |
| convertInfo | object | Convert information. This field is only present for Convert orders. Refer to ConvertInfo |
| swapDetailInfoVo.fromCryptoCurrencyContractAddress | string | swap information. The from crypto currency contract address. Basically, it's stable coin and same with cryptoCurrecny field |
| swapDetailInfoVo.toCryptoCurrencyContractAddress | string | swap information. The to crypto currency contract address. The target token that user want to buy |
| swapDetailInfoVo.toCryptoCurrencyAmount | string | swap information. The amount of the target token the user purchased. |
| userData | string | AES-encrypted JSON string (see details below). Disabled by default; contact us to enable |
ConvertInfo
| Field | Type | Remarks |
|---|---|---|
| fromCoin | string | The source cryptocurrency being converted from |
| fromCoinAmount | string | The amount of source cryptocurrency being converted |
userData field
-
Type: string
-
Remarks: When enabled,
userDatacontains a JSON object (serialized to a string) that is encrypted with AES. The field value is the AES-encrypted ciphertext encoded as a string. This field is disabled by default — please contact us if you need it enabled and for access to the AES key and configuration. -
Decryption reference: follow the AES decryption instructions described in Binance documentation
-
JSON structure (plaintext before AES encryption):
| Field | Type | Remarks |
|---|---|---|
| firstName | string | User's first name |
| middleName | string | User's middle name (optional) |
| lastName | string | User's last name |
| residenceCountry | string | Country code of residence (ISO) |
| birthday | string | Birthday in YYYY-MM-DD format |
| country | string | Country code (ISO) |
| refundAddress | string | Refund crypto address (if any) |
| refundNetwork | string | Network of refund (e.g., ETH) |
| refundMemo | string | Refund memo/memo field (if any) |
Notes:
- Field names and types above show the expected JSON keys that will be present after decrypting
userData. - The concrete AES parameters (mode, IV, padding) and key delivery method will be provided when the field is enabled; see the decryption reference link above for an example.
Example 1
Request Parameters:
Code
Response:
Code
Example 2
Request Parameters:
Code
Response:
Code
Example 3 (Convert Order)
Request Parameters:
Code
Response:
Code
Was this page helpful?
Last modified on