Create Order

Test environment

Prod environment

Http method

  • POST
  • Content-Type: application/json

Http header

ElementMandatoryData TypeRemarks
access-tokenYstringaccessToken from Fetch Token API
appIdYstringPartner unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials with appId and appSecret
timestampYstringUTC time with 13 digit to represent time in milliseconds, expiration period is 5 minutes.
signYstringSHA1(appId + appSecret + timestamp), please refer to Sign demo for Initiate API

Http body

ElementMandatoryData TypeRemarks
sideYstringBUY or SELL(upcase, SELL is not yet supported)
merchantOrderNoNstringmerchant defined order ID
amountYstringfiat amount, unit in Dollar, Won, Yen, etc
fiatCurrencyYstringfiat type, char code with ISO4217 encoding(currently there are four currency USD, EUR, JPY, GBP)
cryptoCurrencyYstringcrypto type, e.g: ETH, please refer to Crypto Query API
depositTypeYintfixed value with 2
addressYstringcrypto address
networkYstringcrypto network: e.g: ETH/BSC/BTC, please refer to Crypto Query API
payWayCodeYstringfixed value with 10001
alpha2Ystringcountry code with two letters defined in ISO 3166-1
redirectUrlNstringredirect URL after crypto transfer to end user’s address successfully
callbackUrlNstringcallback URL when crypto transfer to end user’s address successfully
merchantFixedFeeNstringmerchant defined fixed fee, two decimals maximum, unit in Dollar, Won, Yen, etc, need to work with merchantFeeRate together
merchantFeeRateNstringmerchant defined rate, four decimals, need to work with merchantFixedFee together. e.g. 0.03 mean 3%
merchantNetworkFeeNstringmerchant defined network fee, two decimals maximum, in Dollar, Won, Yen, etc
memoNstringfor XRP and BNB(BEP2 network) , this is a necessary parameter
failRedirectUrlNstringredirect URL in case crypto buying failed

Request sample - Header


Request sample - Body

    "side": "BUY",
    "cryptoCurrency": "USDT",
    "address": "TSx82tWNWe5Ns6t3w94Ye3Gt6E5KeHSoP8",
    "network": "TRX",
    "fiatCurrency": "USD",
    "amount": "100",
    "depositType": 2,
    "payWayCode": "10001",
    "alpha2": "US",
    "redirectUrl": "",
    "callbackUrl": "",

Response sample

    "success": true,
    "returnCode": "0000",
    "returnMsg": "SUCCESS",
    "extend": "",
    "data": {
        "orderNo": "1000974004706615296",
        "payUrl": ""

Please rendering payUrl into your website or H5 page(sample as below), end user just input card necessary details to trigger the fiat payment.

payUrl rendering sample