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 | Explanation | 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 | |
message | string | fait payment failed cause | |
merchantOrderNo | string | merchant order ID | |
networkFee | string | crypto network fee | Count as USD |
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 | |
fiatInUSD | string | fiat amount(count in USD) | Returned if status is FINISHED. |
rampFeeInUSD | string | service charge(count in USD) | Returned if status is FINISHED. |
cryptoNetworkFee | string | priced counted on purchased tokens | Returned if status is FINISHED. |
networkFeeInUSD | string | Network fee (priced in USD), calculated as cryptoNetworkFee and priced in USD | Returned if status is FINISHED. |
cryptoAmountInUSDT | string | The token received by user (priced in USDT) | Returned if status is FINISHED. |
rebateFiatAmount | string | Commission amount, valued in fiat currency. | |
rebateUsdAmount | string | Commission amount, valued in USD. |
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
# PAY_SUCCESS
{
"payTime": "2024-03-08 16:44:55",
"txTime": "",
"signature": "8f531563063e******fsf0f2ba147352dc56f",
"networkFee": "",
"rebateFiatAmount": "",
"network": "TRX",
"cryptoPrice": "1673.01240000",
"payType": "QRIS",
"rampFee": "0.00000000",
"appId": "XXXXXXX",
"fiat": "IDR",
"newSignature": "ukoP+9tFT1Bd******ZF/3FZP7wNjSL3mY=",
"txHash": "",
"email": "[email protected]",
"rampFeeInUSD": "0.00",
"amount": "65000.00000000",
"orderNo": "acv121******s603104256",
"address": "TWhWAYBC25*****afYoahA9oS",
"rebateUsdAmount": "",
"message": "",
"merchantOrderNo": "1ac******8sd3",
"crypto": "USDT",
"rampFeeUnit": "IDR",
"cryptoQuantity": "37.77209300",
"status": "PAY_SUCCESS"
}
# FINISHED
{
"payTime": "2024-03-08 16:44:55",
"txTime": "2024-03-08 16:47:03",
"signature": "8f53******352dc56f",
"networkFee": "15593.49991193",
"rebateFiatAmount": "",
"fiatInUSD": "41.68",
"network": "TRX",
"cryptoPrice": "16763.01240000",
"payType": "QRIS",
"rampFee": "0.00000000",
"appId": "******",
"fiat": "IDR",
"newSignature": "inrA******8O3NpmsJU=",
"txHash": "84b69e4e1d******0e39e90c0911",
"email": "norh******[email protected]",
"rampFeeInUSD": "0",
"amount": "650000.00000000",
"orderNo": "1215580630603104256",
"address": "TWh******oS",
"cryptoNetworkFee": "3.9",
"networkFeeInUSD": "3.9",
"cryptoAmountInUSDT": "37.772093",
"rebateUsdAmount": "",
"message": "",
"merchantOrderNo": "112******3",
"crypto": "USDT",
"rampFeeUnit": "IDR",
"cryptoQuantity": "37.77209300",
"status": "FINISHED"
}
On-ramp callback status
Status | Description |
---|---|
PAY_SUCCESS | Fiat payment success |
PAY_FAIL | Fiat payment fail |
FINISHED | Transferred token, order complete |
PayType list:https://alchemypay.notion.site/4a5f82dba31f4832b482a6a31cb48d57?v=778c3773e845406398e5149b2be9156c
Off-ramp Callback
Element | Data Type | Remark |
---|---|---|
orderNo | string | Alchemy Pay Order ID |
address | string | Order's crypto recipient address |
payTime | string | The time when ACH starts to transfer fiat to the user's account |
completeTime | string | The time when this order receives the cryptos |
merchantOrderNo | string | Merchant order No |
crypto | string | Crypto name |
network | string | Network of crypto |
cryptoPrice | string | Crypto price in USD |
cryptoAmount | string | Order's crypto amount |
fiatAmount | string | The fiat amount |
appId | string | appID |
fiat | string | fiat type |
txHash | string | Token transferred txHash |
string | User's email | |
signature | string | callback signature, the generated signature string is: getMersign(appId,appSecret, orderNo+crypto+network+address) #getMersign is the sign function for Initiate API |
status | string | Order Status |
orderAddress | string | Url to the order detail page |
cryptoacturalAmount | string | The actual received crypto amount |
rampfee | string | Ramp fee, based on fiat type |
receiptTime | string | Fiat arrived time |
paymentType | string | card: transfer to the user's card account: transfer to the user's account |
name | string | Name of the card/account |
card | string | Card number: display 6-digit head and 4-digit tail 121321*1231 |
account | string | Account number: display 4-digit tail *****1231 |
failReason | string | 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 about 1 month ago