Webhook Details

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,the sign method can refer here

The following parameters need to be configured for the push. If you have any requirements, please contact us.

ElementDate TypeRemarks
createTimestringOrder creation time in the format of YYYY-MM-DD, HH:MM:SS, e.g. 2021-11-25 10:00:00
rampFeeUnitstringUnit of Ramp fee, such as USD, ETH
tokenAddressstringContract address of the token returned when purchasing; if it is a native chain coin without a contract address, it is empty
alpha2stringISO 3166-1 two-letter country code, such as US/JP, etc.

Note: For INR local payments, there is no callback upon completion of fiat payment.

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
   "returnCode":"60007",
   "returnMsg":"Payment error occurred, try again or use other payment method",
   "signature":"ffaa29ee7f75cb52598fe460295caafa3ebcb549"
   
}

On-ramp callback status

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

PayType list

PayTypeNamePayway Code
CREDIT_CARDCredit Card10001
DEBIT_CARDDebit Card10002
DIRECTVirtual Account10003
QRISQRIS10004
DANADANA10005
OVOOVO10006
LINKQULINKQU10007
OPMOPM10008
TECH_CARDTech Card100
TECH_WALLETTech Wallet200
TECH_BANK_CARD_TRANSFERTech Bank Card Tran300
TECH_BANK_MO_MOMoMo201
TECH_BANK_ZALO_PAYZaloPay202
TECH_BANK_VIETTEL_PAYViettelPay203
TECH_BANK_GCASH_PAYGCash207
TECH_BANK_TOUCHGO_PAYTouch 'n Go208
TECH_BANK_KAKAO_PAYKakao Pay209
TECH_BANK_LINE_PAYLINE Pay206
TECH_BANK_DANA_PAYDANA205
BINANCE_PAYBinance Pay20001
PIX_PAYPix Pay30001
BANCNETBancnet80039
BPIBPI80040
UNION_BANkUNION_BANK80041
COINSCOINS80066
BDOBDO80068
RCBCRCBC80070
GCASHGCASH80059
QRPHQRPH90007
PAY_NOWPAY NOW40001
E_NETSE NETS40002
THAI_QRTHAI_QR40003
KHIPU_PAYKHIPU PAY30002
APPLE_PAYApple Pay501
VND_BANK_TRANSFERBank Transfer210
SPEISPEI601
ARS_BANK_TRANSFERBank Transfer30003
GOOGLE_PAYGoogle Pay701
ECU_BANK_TRANSFERBank Transfer11000
COP_PSEPSE12000
MYR_BANK_TRANSFERBank Transfer13000
UPIUPI90001
IMPSIMPS90002
PAYOUT_BANK_TRANSFERBank Transferpayout101
PERUPAYBank Transfer15000
EUROPAYBank Transfer16000
EUPAYBank Transfer17000
NGNPAYBank Transfer18000
YYH10010_CARDCard10010
NIUM19000_BANK_TRANSFERBank Transfer19000
GATEPAY_21000Gate Pay21000
SEPA InstantSEPA Instant60001
FPSFPS60002

Off-ramp Callback

ElementData TypeRemark
orderNoAlchemy Pay Order ID
addressOrder's crypto recipient address
payTimeThe time when ACH starts to transfer fiat to the 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 the ramp fee
appIdappID
fiatfiat typr
txHashToken transferred 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 the order detail page
cryptoacturalAmountThe actual received crypto amount
rampfeeRamp fee, based on fiat type
receiptTimeFiat arrived time
paymentTypecard: transfer to the user's card
account: transfer to the user's account
nameName of the card/account
cardCard number: display 6-digit head and 4-digit tail
121321*1231
accountAccount 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