API For Notification Of Token Transfer
Introduction
After user payment, AlchemyPay will send webhook including user's payment information.Merchant need to transfer crypto according to parameters.
API Description
Request Method: POST
Request Path: API defined by merchant
Request Parameters
Header Parameters:
| Element | Mandatory | Data Type | Remarks |
|---|---|---|---|
| appId | Y | string | Partner unique ID |
| timestamp | Y | string | UTC time with 13 digits to represent time in milliseconds, the expiration period is 5 minutes |
| sign | Y | string | SHA1(appId + appSecret + timestamp), perform SHA1 hash calculation on the concatenated string of the three parameters to generate hexadecimal characters,the sign method can refer here |
Body Parameters:
| Element | Mandatory | Data Type | Remarks |
|---|---|---|---|
| orderNo | Y | string | AlchemyPay's order no |
| merchantOrderNo | C | string | If the order includes the merchantOrderNo, this field will be returned. |
| crypto | Y | string | Name of the crypto |
| network | Y | string | Name of the network |
| address | Y | string | Address for transfer |
| cryptoAmount | Y | string | Amount of the token(include the network fee) |
| cryptoPrice | Y | string | Price of the token / USDT |
| usdtAmount | Y | string | The amount of USDT for this order |
Response Parameters
Response Parameter Example(Success):
{
"data": null,//Custom data
"success": true,
"returnCode": "0000",
"returnMsg": "in amet"
}
Response Parameter Example(Fail):
{
"data": null,//Custom data
"success": false,
"returnCode": "9999",
"returnMsg": "failed"
}
ReturnCode:
| returnCode | Remarks |
|---|---|
| 0000 | success |
| 9999 | failure |
Updated 5 months ago