Webhooks

Client Transaction's Notification Webhook

post

Webhook to notify about the transaction status updates. Will notify 3 possible states: CAPTURED, RECEIVED,FAILED

Signature Format Algorithm: HMAC-SHA256 Length: 64-character hexadecimal string Computation: The signature is generated by hashing the full JSON body (excluding the signature field) using HMAC-SHA256 with the secret key.

Signature Generation Example (Node.js) Before sending the webhook, the signature must be computed:

const crypto = require('crypto');

const secret = "WEBHOOK_SECRET"; // Shared secret key

const payload = JSON.stringify({ event: "Transaction.Captured", data: { transaction: { id: "67a0307eaddea901a60144ec", purchaseAmount: "50000", totalAmount: "50000", externalId: "123456", currency: "COP", status: "CAPTURED" } } });

// Generate HMAC-SHA256 signature const signature = crypto .createHmac('sha256', secret) .update(payload) .digest('hex');

// Add the signature to the payload const signedPayload = { ...JSON.parse(payload), signature };

console.log(signedPayload);

Authorizations
Responses
200Success
application/json
post
POST /client-url HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "event": "Transaction.Captured",
  "data": {
    "transaction": {
      "id": "67a0307eaddea901a60144ec",
      "purchaseAmount": "50000",
      "totalAmount": "50000",
      "externalId": "{{CLIENT_TRANSACTION_ID}}",
      "currency": "COP",
      "status": "CAPTURED"
    }
  },
  "signature": "f8a23d5e0c7c2b6e4a8f9d0c5b3d7e1a7f6c4e2d9b0a5f8c3e1d6b9a7c4e2d1f"
}

Last updated