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
Element | Data Type | Remarks |
---|---|---|
appId | string | partner unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials with appId and appSecret |
orderNo | string | Alchemy Pay Order ID |
string | end user's email | |
crypto | string | crypto type |
cryptoPrice | string | crypto price |
cryptoQuantity | string | crypto amount |
payType | string | fiat payment method |
fiat | string | fiat type |
amount | string | fiat amount |
payTime | string | fiat payment time |
network | string | crypto network |
address | string | crypto address |
txTime | string | crypto received time |
txHash | string | crypto hash |
status | string | Order status:PAY_FAIL、PAY_SUCCESS、FINISHED Selling crypto status:Paying:request paying success, Pay Success:pay success |
message | string | fait payment failed cause |
merchantOrderNo | string | merchant order ID |
networkFee | string | crypto network fee |
rampFee | string | ramp fee |
signature | string | callback 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.
Element | Date Type | Remarks |
---|---|---|
createTime | string | Order creation time in the format of YYYY-MM-DD, HH:MM:SS, e.g. 2021-11-25 10:00:00 |
rampFeeUnit | string | Unit of Ramp fee, such as USD, ETH |
tokenAddress | string | Contract address of the token returned when purchasing; if it is a native chain coin without a contract address, it is empty |
alpha2 | string | ISO 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
Status | Description |
---|---|
PAY_SUCCESS | Fiat payment success |
PAY_FAIL | Fiat payment fail |
FINISHED | Transferred token, order complete |
PayType list
PayType | Name | Payway Code |
---|---|---|
CREDIT_CARD | Credit Card | 10001 |
DEBIT_CARD | Debit Card | 10002 |
DIRECT | Virtual Account | 10003 |
QRIS | QRIS | 10004 |
DANA | DANA | 10005 |
OVO | OVO | 10006 |
LINKQU | LINKQU | 10007 |
OPM | OPM | 10008 |
TECH_CARD | Tech Card | 100 |
TECH_WALLET | Tech Wallet | 200 |
TECH_BANK_CARD_TRANSFER | Tech Bank Card Tran | 300 |
TECH_BANK_MO_MO | MoMo | 201 |
TECH_BANK_ZALO_PAY | ZaloPay | 202 |
TECH_BANK_VIETTEL_PAY | ViettelPay | 203 |
TECH_BANK_GCASH_PAY | GCash | 207 |
TECH_BANK_TOUCHGO_PAY | Touch 'n Go | 208 |
TECH_BANK_KAKAO_PAY | Kakao Pay | 209 |
TECH_BANK_LINE_PAY | LINE Pay | 206 |
TECH_BANK_DANA_PAY | DANA | 205 |
BINANCE_PAY | Binance Pay | 20001 |
PIX_PAY | Pix Pay | 30001 |
BANCNET | Bancnet | 80039 |
BPI | BPI | 80040 |
UNION_BANk | UNION_BANK | 80041 |
COINS | COINS | 80066 |
BDO | BDO | 80068 |
RCBC | RCBC | 80070 |
GCASH | GCASH | 80059 |
QRPH | QRPH | 90007 |
PAY_NOW | PAY NOW | 40001 |
E_NETS | E NETS | 40002 |
THAI_QR | THAI_QR | 40003 |
KHIPU_PAY | KHIPU PAY | 30002 |
APPLE_PAY | Apple Pay | 501 |
VND_BANK_TRANSFER | Bank Transfer | 210 |
SPEI | SPEI | 601 |
ARS_BANK_TRANSFER | Bank Transfer | 30003 |
GOOGLE_PAY | Google Pay | 701 |
ECU_BANK_TRANSFER | Bank Transfer | 11000 |
COP_PSE | PSE | 12000 |
MYR_BANK_TRANSFER | Bank Transfer | 13000 |
UPI | UPI | 90001 |
IMPS | IMPS | 90002 |
PAYOUT_BANK_TRANSFER | Bank Transfer | payout101 |
PERUPAY | Bank Transfer | 15000 |
EUROPAY | Bank Transfer | 16000 |
EUPAY | Bank Transfer | 17000 |
NGNPAY | Bank Transfer | 18000 |
YYH10010_CARD | Card | 10010 |
NIUM19000_BANK_TRANSFER | Bank Transfer | 19000 |
GATEPAY_21000 | Gate Pay | 21000 |
SEPA Instant | SEPA Instant | 60001 |
FPS | FPS | 60002 |
Off-ramp Callback
Element | Data Type | Remark |
---|---|---|
orderNo | Alchemy Pay Order ID | |
address | Order's crypto recipient address | |
payTime | The time when ACH starts to transfer fiat to the user's account | |
completeTime | The time when this order receives the cryptos | |
merchantOrderNo | Merchant order No | |
crypto | Crypto name | |
network | Network of crypto | |
cryptoPrice | Crypto price in fiat type | |
cryptoAmount | Order's crypto amount | |
fiatAmount | The fiat amount user will receive, excluding the ramp fee | |
appId | appID | |
fiat | fiat typr | |
txHash | Token transferred txHash | |
User's email | ||
signature | callback signature, the generated signature string is: getMersign(appId,appSecret, appId+orderNo+crypto+network+address) #getMersign is the sign function for Initiate API | |
status | Order Status | |
orderAddress | Url to the order detail page | |
cryptoacturalAmount | The actual received crypto amount | |
rampfee | Ramp fee, based on fiat type | |
receiptTime | Fiat arrived time | |
paymentType | card: transfer to the user's card account: transfer to the user's account | |
name | Name of the card/account | |
card | Card number: display 6-digit head and 4-digit tail 121321*1231 | |
account | Account number: display 4-digit tail *****1231 | |
failReason | Fail 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
Status | Description |
---|---|
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 |
Updated 3 days ago