Webhooks
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);
e.g. Transaction.Received
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.
Payload
No content
Last updated

