Docs
Docs

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


FieldDescription
idUnique ID of the transaction assigned by the payment gateway.
orderContains details about the purchase order.
merchantOrderIdUnique identifier for the order assigned by the merchant.
amountTotal amount of the order.
currencyCurrency code following the ISO 4217 standard.
payloadContains detailed information about the transaction.
responseCodeResponse code indicating the result of the transaction (in this case, "00" indicates approval).
responseDescriptionDescription associated with the response code.
authorizationNumberAuthorization number of the transaction.
referenceNumberReference number associated with the transaction.
statusTransaction status; in this case, "paid" indicates that the transaction was successfully completed.
recurringPaymentIndicates if card details have been stored.
tokenUnique identifier for the card to process future recurring payments or scheduled payments.
cardInformation related to the payment form.
binFirst 6 digits of the card.
terminationLast four digits of the card.
ThreeDsDataIf the transaction has been authenticated by 3DS, this data is added.
eciAuthentication information indicator.
versionVersion of the 3DS specification used in the transaction.
DsTransactionIdUnique identifier of the transaction on the directory server.
isApprovedIndicates whether the transaction was approved. In this example, it is “true,” which means the transaction was approved.
isFailureIndicates whether the transaction has failed. In this example, it is “false”, indicating that the transaction has not failed.
errorsIt 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.
hashIt 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.