In our system, we have implemented a callback function, and to set it up, we need to add the merchant's URL in merchan settings where the callbacks will be sent.The callback can be sent in next cases:
when the order status changes.
when the order amount changes.
Callback will be a POST HTTP request to the address you have configured, depending on the status the order transitions to.The request will include a "Signature" header by which you can verify the validity of the request. However, we still recommend making a request to check the status. CallBack params#
POST {yourCallBackUrl}#
externald - order id in our system (string)
status - order status (string)
amount - order amount (number)
orderType - type of the order (string) It can accept values Deposit or Withdrawal
{
"externald": "e21ac743-9205-4a22-a634-bcd772ad770e",
"status": "Processing",
"amount": 100,
"orderType": "Deposit"
}
Signature#
The request will include a Signature header, which you can use to verify that the request is valid. However, we still recommend making a status check request.Step 1#
Retrieving Data for the Signature:1.
Extract the values of externalId, status, amount and orderType from the request.
2.
Use your privateKey to construct the signature string in the following format: externald;status;amount;orderType;privatekey
Step 2#
Calculating the Signature:1.
Apply SHA-256 hashing to the string obtained in Step 1.
2.
Convert the hash result to a hexadecimal string.
Step 3#
1.
Extract the Signature header from the request.
2.
Repeat steps 1 and 2 to obtain the expected signature.
3.
Compare the received signature with the expected one. If they match, the request signature is valid.
Examples of validation#
JavaScript#
Python#
C Sharp#