Create Order

PATH:POST /open/api/v4/merchant/trade/create

❗️This API can only be invoked on the server side.

Header:

ParameterMandatoryTypeRemarks
access-tokenYstringLogin-free accessToken value, which can be obtained from the access token interface
appIdYstringApp unique identifier
timestampYstringCurrent UTC 13-digit timestamp, valid within 5 minutes
signYstringSignature, you can refer to the signature Click Here

Body:

ParameterMandatoryTypeRemarks
sideYstringPass value: BUY
merchantOrderNoYStringThe merchant's custom order number and the merchant needs to guarantee it is unique.
amountYStringThe purchase amount of fiat currency; the number of digits needs to be controlled according to the precision of the fiat currency. A precision of 0 means an integer and a precision of 2 means two decimal places. For accuracy, please refer to Basic Data - Legal Currency and Payment Method
fiatCurrencyYstringFiat code, USD/EUR, etc.
cryptoCurrencyYstringCrypto name. example: USDT
depositTypeYintFixed value 2
addressYstringThe address where the user receives the digital currency
networkYstringCrypto acquiring network: eg: ETH/BSC/BTC, etc.
payWayCodeYstringPayment method code: For the specific value, please refer Click Here
redirectUrlNstringThe redirection address after the successful purchase of coins
callbackUrlNstringCallback address after a successful purchase
memoNstringNote: BNB network 'memo' parameter is mandatory.
failRedirectUrlNstringThe page redirect address after the coins purchase fails, if not passed in, the payment failure will also jump to the redirect URL
merchantNameNstringMerchant name, if passed in, the merchant name will be displayed on the payment result page

Example

Request Parameters:

{
    "side": "BUY",
    "cryptoCurrency": "USDT",
    "address": "TSx82tWNWe5Ns6t3w94Ye3Gt6E5KeHSoP8",
    "network": "TRX",
    "fiatCurrency": "USD",
    "amount": "100",
    "depositType": 2,
    "payWayCode": "10001",
    "redirectUrl": "http://payment.jyoumoney.com/alchemy/payResultPage/DZ02207121427022754",
    "callbackUrl": "http://payment.jyoumoney.com/alchemyRamp/pay/callback?tradeNo=DZ02207091800356504"
}

Response Parameters:

{  
    "success": true,  
    "returnCode": "0000",  
    "returnMsg": "SUCCESS",  
    "extend": "",  
    "data": {  
		"orderNo":"945628891261980032",  
        "payUrl": "<http://www.amazon.com?token=aaaa&userNo=bbbb&email=cccc&orderNo=xxxx&id=xxxx&cardFlag=false>"  //支付跳转地址  
    }  
}

{
    "success": false,
    "returnCode": "3103",
    "returnMsg": "Please refresh timestamp",
    "extend": "",
    "data": null,
    "traceId": "64ed9681618806b022dd303e2ea1ed13"
}

Return Code List Click Here