Notification
When integrating our payment gateway and properly configuring notification management, merchants can provide their customers with a seamless shopping experience and maintain accurate control over the status of financial transactions.
The transaction result notification is processed asynchronously to ensure a quick and efficient response. The merchant must implement asynchronous notification handling logic to process the information as soon as it is received.
Important Notes
It is crucial to validate the result of all notifications using the hash through the process mentioned with the SHA-256 algorithm. This securely ensures that the notification source comes exclusively from our secure servers.
Example of Notification:
Method: post
URL: http://{environment-domain}/payment-notification
HTTP Headers: Content-Type: application/json
Add authentication headers
{
"id": "5c51bebd-5b21-4ef3-b980-d41eb0b83568",
"order": {
"merchantOrderId": "9a6ecf36-8265-11ee-b962-0242ac120002",
"amount": "100.00",
"currency": "484"
},
"payload": {
"responseCode": "00",
"responseDescription": "Approved or completed successfully (if balances are available)",
"authorizationNumber": "280188",
"referenceNumber": "000027389440",
"status": "Paid"
},
"card": {
"bin": "411111",
"termination": "1111"
},
"recurringPayment": {
"token": "2b43f315-b053-4cd2-bff0-14dd2e7da52a"
},
"ThreeDsData": {
"Eci": "05",
"Version": "2.2.0",
"DsTransactionId": "92ba0298-5278-4368-a936-9f8ed7c1ce8f"
},
"isApproved": true,
"isFailure": false,
"errors": null,
"hash": "cda557c33bdd28888a4ac066884fa2e498000ae934b9a4bebc3ad1fdebe4a095"
}
Field Description
Field | Description |
---|---|
id | Unique ID of the transaction assigned by the payment gateway. |
order | Contains details about the purchase order. |
merchantOrderId | Unique identifier for the order assigned by the merchant. |
amount | Total amount of the order. |
currency | Currency code following the ISO 4217 standard. |
payload | Contains detailed information about the transaction. |
responseCode | Response code indicating the result of the transaction (in this case, "00" indicates approval). |
responseDescription | Description associated with the response code. |
authorizationNumber | Authorization number of the transaction. |
referenceNumber | Reference number associated with the transaction. |
status | Transaction status; in this case, "paid" indicates that the transaction was successfully completed. |
recurringPayment | Indicates if card details have been stored. |
token | Unique identifier for the card to process future recurring payments or scheduled payments. |
card | Information related to the payment form. |
bin | First 6 digits of the card. |
termination | Last four digits of the card. |
ThreeDsData | If the transaction has been authenticated by 3DS, this data is added. |
eci | Authentication information indicator. |
version | Version of the 3DS specification used in the transaction. |
DsTransactionId | Unique identifier of the transaction on the directory server. |
isApproved | Indicates whether the transaction was approved. In this example, it is “true,” which means the transaction was approved. |
isFailure | Indicates whether the transaction has failed. In this example, it is “false”, indicating that the transaction has not failed. |
errors | It contains details such as error number and a description, if any. In this case, it is “null,” which means that no errors occurred in the transaction. |
hash | It is used to add a layer of security and ensure that the message comes from the payment gateway. |
Hash calculation
var hash = sha256({id}|{payload.responseCode}|{payload.authorizationNumber}|{payload.referenceNumber}|{isApproved});
//Evaluando la notificación de ejemplo
var hash = sha256(5c51bebd-5b21-4ef3-b980-d41eb0b83568|00|280188|000027389440|true);
//resultado hash de ejemplo cda557c33bdd28888a4ac066884fa2e498000ae934b9a4bebc3ad1fdebe4a095
Important notes
It is crucial to validate the result of all notifications through hash using the mentioned process with the SHA-256 algorithm. This securely ensures that the source of the notification comes exclusively from our secure servers.
Updated 3 months ago