Overview
When receiving webhook notifications, it is important to ensure that the requests are genuinely from our system and that sensitive data is protected. This guide covers how encryption works and best practices for securing your webhook endpoint.Reference Encryption
When encryption is enabled for your account, theReference field (which contains the transaction PCN) is encrypted using your RSA public key before delivery. All other fields in the payload remain in plaintext.
Encryption is optional and is configured on your dashboard.
How It Works
You provide your RSA public key
You are provided with a Base64-encoded RSA public key which is stored securely on our side and available for download on your dashboard.
We encrypt the Reference field
Before delivering each webhook event, we encrypt the
Reference value using your public key.Encrypted Payload Example
When encryption is enabled, the webhook payload looks like this:Reference is encrypted. All other fields are readable.
Unencrypted Payload Example
When encryption is not enabled:Decrypting the Reference Field
Node.js
Java
Python
Securing Your Endpoint
IP Whitelisting
For additional security, you can restrict your webhook endpoint to only accept requests from our IP addresses. Contact your account manager for the current list of IP addresses.Respond Quickly
Return a200 status code immediately upon receiving the webhook. Perform any heavy processing (database updates, notifications, etc.) asynchronously to avoid timeouts.
Idempotency
The same webhook event may be delivered more than once due to retries. Always check whether you have already processed an event before acting on it. Use theReference field as your deduplication key:
Troubleshooting
I'm not receiving webhook notifications
I'm not receiving webhook notifications
Verify that your webhook URL is correctly registered and that your server is reachable from the internet. Ensure your endpoint returns a
200 status code.I'm receiving duplicate events
I'm receiving duplicate events
This is expected behaviour during retries. Implement idempotency using the
Reference field to avoid processing the same event twice.The Reference field is unreadable
The Reference field is unreadable
If encryption is enabled for your account, the
Reference field will be Base64-encoded encrypted text. Decrypt it using your RSA private key as shown in the examples above.My endpoint keeps getting retried
My endpoint keeps getting retried
Ensure your server responds with exactly
200 HTTP status code. Any other code (201, 204, 4xx, 5xx) will trigger a retry.