Create Order

PATH:POST /open/api/v3/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
signYstringSign the appId, timestamp, and parameters in the request body alphabetically. The sign method can refer here

Body:

ParameterMandatoryTypeRemarks
sideYstringPass value: BUY
merchantOrderNoNStringThe 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 here
alpha2YstringISO 3166-1 Two-upper-letter country code, such as US/JP.
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",
    "alpha2": "US",
    "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"
}

Error Code Description

CodeDescriptionreturnMsg
3100User rate configuration errorPlease contact with our team to configure commission
3101Crypto is not configuredPlease contact with our team to configure crypto
3102Amount Exceeded limitQuote amount exceed the range, The Min purchase amount is %s, The max purchase amount is %s
3103Timestamp expiredPlease refresh timestamp
3104AppId does not existPlease contact with our team to create account
3105Wrong addressInvalid Crypto Address
3106The crypto-receiving address is at riskYour current withdrawal address is at risk, please check or change to another one
3107Wrong request pathIllegal request path