Skip to main content

Pre order

POST /papi/v1/ramp/connect/buy/pre-order

Request Body​

FieldTypeMandatoryRemarks
externalOrderIdstringYesThe unique order id from the partner side. Supports only letters and numbers.
fiatCurrencystringNoFiat currency. If you don't want to specify it or cannot specify it, you can leave it null and Binance Pay Onchain will automatically select/recommend a default fiat currency.
cryptoCurrencystringNoCrypto currency. If you don't want to specify it or cannot specify it, you can leave it null and Binance Pay Onchain will automatically select/recommend a default crypto currency. (But for SEND_PRIMARY it's mandatory)
amountTypeintYesSpecify whether the requested amount is in fiat:1 or crypto:2
requestedAmountstringNoRequested amount. Fraction is 8
payMethodCodestringNoThe payment method code is from payment method list API. If you don't want to specify it or cannot specify it, you can leave it null and Binance Pay Onchain will automatically select/recommend a default payment method.
payMethodSubCodestringNoThe payment method subcode is from payment method list API. If you don't want to specify it or cannot specify it, you can leave it null and Binance Pay Onchain will automatically select/recommend a default payment method.
networkstringYescrypto network
addressstringYeswallet address
memostringNoIf blockchain required
redirectUrlstringNoThe redirectUrl is for redirecting to your website if order is completed
failRedirectUrlstringNoThe redirectUrl is for redirecting to your website if order is failed
redirectDeepLinkstringNoThe redirectDeepLink is for redirecting to your APP if order is completed
failRedirectDeepLinkstringNoThe failRedirectDeepLink is for redirecting to your APP if order is failed
clientIpstringNoThe original client IP
clientTypestringNoThe original client type: web/mobile
customizationobjectNoCustomization settings for the current order. Please refer to "Customization".
contractAddressstringNoCrypto contract address. required if buying a token that is not listed on Binance spot
gtrTemplateCodestringNoGTR (Global travel rule) template code. When users need to submit GTR questionnaire, this field can be used to specify the corresponding template answers for pre-filling the questionnaire form.
affiliateCodestringNoThe Binance referral code that you can use to earn revenue share from registered users. Note: this feature is disabled by default. Please contact us for more detail.

Response Body​

FieldTypeRemarks
linkstringThe landing page link of Binance Pay Onchain. For information on how to use it, please refer to "Landing page and redirection".
linkExpireTimetimestampThe expiration time of link

Example 1​

Request Parameters:

{
"externalOrderId": "946972922319",
"fiatCurrency": "EUR",
"cryptoCurrency": "USDT",
"amountType": 1,
"requestedAmount": "100",
"payMethodCode": "BUY_P2P",
"payMethodSubCode": "BANK",
"network": "ETH",
"address": "0xbb4CdB9CBd3AB01bD10BaEBF2De08d9173bc095c",
"redirectUrl": "https://test.examplepartner.com/buy/home",
"failRedirectUrl": "https://test.examplepartner.com/buy/order/failure",
"redirectDeepLink": "examplepartner://buy/home",
"failRedirectDeepLink": "examplepartner://buy/order/failure",
"clientIp": "154.55.51.218",
"customization": {
"SKIP_CASHIER": false,
"AUTO_REDIRECTION": true
}
}

Response:

{
"success": true,
"code": "000000",
"message": "success",
"data": {
"link": "https://app.binance.com/uni-qr/qccnt?amount=800&channel=card&cryptoCurrency=USDT&externalOrderId=676972925203314539&fiatCurrency=EUR&merchantCode=example-partner&paymentMethodCode=BUY_CARD&sign=a6fdb970954b3407e63c2518307bd42b8b1de3fb128914a9f5b926077efcec5f&utm_campaign=connect_open_api&utm_source=test",
"linkExpireTime": 1742222863560
}
}

Example 2​

Request Parameters:


{
"externalOrderId": "599518801876",
"contractAddress": "0x09f4eBB8567ea0e969f10799CA678F9A172DC2Bb",
"fiatCurrency": "EUR",
"fiatAmount": "150",
"address": "0x41B2E5C72cZB21fB69de8243244AF6F124b2673a",
"network": "BSC",
"gtrTemplateCode": "TRAVEL_001",
"affiliateCode": "test"
}

Response:

{
"code": "000000",
"message": "success",
"data": {
"link": "https://app.binance.com/uni-qr/ccnt?amount=150&baseCurrency=EUR&channel&cryptoCurrency=USDT&externalOrderId=599518801876&fiatCurrency=EUR&merchantCode=example-partner&paymentMethodCode&registerChannel=example-partner&sign=dd0a9e3e646d2ce3910d64811a9db46535d756a20650d56e190793a94d03727b&type=1&utm_campaign=connect_open_api&utm_source=test",
"linkExpireTime": 1747128070729
},
"success": true
}

Example - lock crypto amount & NET_RECEIVE​

Request Parameters:

{
"externalOrderId": "946972922319",
"fiatCurrency": "EUR",
"cryptoCurrency": "USDT",
"amountType": 2,
"requestedAmount": "200",
"payMethodCode": "BUY_CARD",
"payMethodSubCode": "card",
"network": "BSC",
"address": "0xbb4CdB9CBd3AB01bD10BaEBF2De08d9173bc095c",
"redirectUrl": "https://test.examplepartner.com/buy/home",
"failRedirectUrl": "https://test.examplepartner.com/buy/order/failure",
"redirectDeepLink": "examplepartner://buy/home",
"failRedirectDeepLink": "examplepartner://buy/order/failure",
"clientIp": "154.55.51.218",
"customization": {
"LOCK_ORDER_ATTRIBUTES": [
6
],
"SEND_PRIMARY": true,
"NET_RECEIVE": true
}
}

Response:

{
"success": true,
"code": "000000",
"message": "success",
"data": {
"link": "https://app.binance.com/uni-qr/qccnt?amount=800&channel=card&cryptoCurrency=USDT&externalOrderId=676972925203314539&fiatCurrency=EUR&merchantCode=example-partner&paymentMethodCode=BUY_CARD&sign=a6fdb970954b3407e63c2518307bd42b8b1de3fb128914a9f5b926077efcec5f&utm_campaign=connect_open_api&utm_source=test",
"linkExpireTime": 1742222863560
}
}