Configuring Webhooks
You can configure your Webhook URL in the PayX Dashboard under Developer Settings. Once configured, PayX will send aPOST request to your URL whenever a transaction is completed or failed.
Payload Structure
The webhook payload is a JSON object containing the transaction details.Security
To ensure that a webhook was actually sent by PayX, you should verify the signature. PayX includes anx-payx-signature header in every request. This is an HMAC-SHA256 hash of the request body, signed with your Webhook Secret.
Verifying Signatures (Node.js SDK)
If you are using thepayx-node SDK, verifying signatures is straightforward: