Callback
Description
- Alchemy Pay will send an asynchronous notification message to the callbackUrl address defined by the merchant. The merchant can develop an end-point to receive this notification message and update the status of the transaction accordingly
- The msg parameter shows the failure cause description only for a failed transaction; in case the transaction succeeds, msg parameter shows NULL, and orderStatus will be in the notification message.
- Upon receiving the notification, the merchant shall verify the message integrity according to the signature verification procedure. If the verification is successful, the system is required to respond with status code 200 OK and the string SUCCESS in the response body.
- Asynchronous notification messages can be sent out multiple times
Http method
- POST
- Content-Type: application/x-www-form-urlencoded
Notification message
Element | Data Type | Signed | Remarks |
---|---|---|---|
merchantNo | string | Y | merchant unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials |
merchantOrderNo | string | Y | merchant defined transaction ID, must be unique for each request. |
orderNo | string | Y | Alchemy Pay defined transaction ID |
currency | string | Y | USD, EUR, GBP, JPY |
orderAmount | string | Y | transaction amount, unit in cents (i.e. 100 = $1) |
orderFee | string | Y | transaction fee, unit in cents (i.e. 100 = $1) |
payType | string | Y | INTERNATIONAL_CARD_PAY |
payModel | string | Y | either CREDIT_CARD or DEBIT_CARD |
orderStatus | string | Y | transaction status, please refer to error code |
Sign | string | N | signature with RsaUtil.sign method |
Notification sample
{data=
{
"msg":"",
"finishTime":1647825542000,
"orderNo":"",
"sign":"",
"orderFee":1,
"orderStatus":"SUCCESS",
"payModel":"",
"merchantOrderNo":"",
"orderAmount":1,
"payType":"",
"orderTime":1647825427000,
"currency":"",
"merchantNo":""
},
meta=
{
"code":"0000",
"success":"true"
}
}
{data=
{
"msg":"",
"finishTime":1653896138000,
"orderNo":"R08OC0220530233351135006763087",
"sign":"zWT1VWtkjd0oIJ9cw2geiRqrBHbAlo+jJTAL2woNqLe85tSAGEiz+eMRuPsjDYDIyKuCiKWbtLng0iE2R3g0HE3jXXtELeMVa69ofa7Pd+YZxFB5bcnnvFBDdecXwlmdeFydlLMYA77bHXXOmCbI3Ervnmvg5R0YtupVXWp+nXUk8zu2RgdigQKnM8OX3AFeB+1CZmgJ7mtzJzqeNXrCJ8YBlV+H2Sk6XY3Gd1s8y+/VXSRCv/cKLjJr8+8+p3lO3FAjpjVU0Ud3BNbD5+8xNWQBNe0uH8pPKZwn8nnp/Zor0Bsc114m/xRjZNyRIEeGLzjfIH69BCPX0nyiyldyUA\u003d\u003d",
"orderFee":35,
"orderStatus":"SUCCESS",
"payModel":"CREDIT_CARD",
"merchantOrderNo":"1531297795066171392",
"orderAmount":100,
"payType":"INTERNATIONAL_CARD_PAY",
"orderTime":1653896031000,
"currency":"USD",
"merchantNo":"AC20226**90"
},
meta=
{
"code":"0000",
"success":"true"
}
}
Updated 3 days ago