Introduction

The notify payloads AlchemyPay will be posted to the callbackUrl when on/off ramp

Http method

  • POST merchant defined api
  • Content-Type: application/json

On-ramp Callback

ElementData TypeRemarks
appIdstringpartner unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials with appId and appSecret
orderNostringAlchemy Pay order ID
emailstringend user's email
cryptostringcrypto type
cryptoPricestringcrypto price
cryptoQuantitystringcrypto amount
payTypestringfiat payment method
fiatstringfiat type
amountstringfiat amount
payTimestringfiat payment time
networkstringcrypto network
addressstringcrypto address
txTimestringcrypto received time
txHashstringcrypto hash
statusstringOrder status:PAY_FAIL、PAY_SUCCESS、FINISHED

Selling crypto status:Paying:request paying success, Pay Success:pay success
messagestringfait payment failed cause
merchantOrderNostringmerchant order ID
networkFeestringcrypto network fee
rampFeestringramp fee
signaturestringcallback signature, the generated signature string is: getMersign(appId,appSecret, appId+orderNo+crypto+network+address)
#getMersign is the sign function for Initiate API

On-ramp Payload sample

{
   "amount":"311.00000000",
   "orderNo":"1004509256035020800",
   "address":"0xdc8853549de541909cbedb8c55be4******eec5",
   "payTime":"2022-08-04 06:30:03",
   "txTime":"",
   "networkFee":"",
   "message":"Declined by 3-D Secure",
   "merchantOrderNo":"",
   "crypto":"USDC",
   "network":"MATIC",
   "cryptoPrice":"",
   "payType":"CREDIT_CARD",
   "rampFee":"12.89064997",
   "cryptoQuantity":"",
   "appId":"jcudotl1hwyvxhdp",
   "fiat":"EUR",
   "txHash":"",
   "email":"[email protected]",
   "status":"PAY_FAIL", //PAY_SUCCESS PAY_FAIL FINISHED
   "signature":"ffaa29ee7f75cb52598fe460295caafa3ebcb549"
   
}

On-ramp callback status

StatusDescription
PAY_SUCCESSFiat payment success
PAY_FAILFiat payment fail
FINISHEDTransfered token, order complete

Off-ramp Callback

ElementData TypeRemark
orderNoAlchemy Pay order ID
addressOrder's crypto recipient address
payTimeThe time when ACH starts to transfer fiat to user's account
completeTimeThe time when this order receives the cryptos
merchantOrderNoMerchant order No
cryptoCrypto name
networkNetwork of crypto
cryptoPriceCrypto price in fiat type
cryptoAmountOrder's crypto amount
fiatAmountThe fiat amount user will receive, excluding ramp fee
appIdappID
fiatfiat typr
txHashToken transfered txHash
emailUser's email
signaturecallback signature, the generated signature string is: getMersign(appId,appSecret, appId+orderNo+crypto+network+address)
#getMersign is the sign function for Initiate API
statusOrder status
orderAddressUrl to order detail page
cryptoacturalAmountActual received crypto amount
rampfeeRamp fee, based on fiat type
receiptTimeFiat arrived time
paymentTypecard: transfer to user's card
account: transfer to user's account
nameName of the card/account
cardCard number: display 6 digit head and 4 digit tail
121321*1231
account账户信息,展示后四位,****1231
Account number: display 4 digit tail
*1231
failReasonFail reason

Off-ramp Payload sample

{
  "orderNo": "1080106145537236992", 
  "address": "dev03dc84dbfeb74853aa91154efa9b7a13", // wallet address user need to transfer
  "payTime": "2023-02-28 20:44:46", // transfer fiat start time
  "completeTime": "2023-02-28 20:41:08", // block confirm time
  "merchantOrderNo": "kvhl6zvvrg", 
  "crypto": "USDT",
  "network": "TRX", 
  "cryptoPrice": "1.0000000000", // fiat
  "cryptoAmount": "100.0000000000",
  "fiatAmount": "100.0000000000", //fiat amount user will receive
  "appId": "ahzxh0klegv1fzol",
  "fiat": "USD", 
  "txHash": "sdasdasdasdasdasdsad",
  "email": "[email protected]", 
  "signature": "9aa9b34e950061f1bb1e9ccd6fadcedab8e354f6",
  "status": "4",  // 1:create order success  2:user trnasfered token  3:start to pay fiat to user  4:payment success 5:payment fail 6:refund success 7:order expired
  "orderAddress": "https://ramp-dev.alchemytech.cc/#/sellOrder?sellOrderId\u003d1080106145537236992", // order detail page
  "cryptoActualAmount": "100.0000000000", // 
  "rampFee": "1.7500000000", // fiat
  "receiptTime": "2023-02-28 20:45:22", //transfer fiat success time
  "paymentType": "10001", //  10001 banktransfer
  "name": "asdfsfsd", // account name
  "account": "******4567", // account number
  "card": "", // card No 
  "failReason": "" // failReason
}

Off-ramp callback status

StatusDescription
1Create order success
2User trnasfered token
3Start to pay fiat to user
4Payment success
5Payment fail
6Refund success
7Order expired