x-webhook-signature) in the header.
The verification process is as follows:
- Extract the
x-webhook-timestampfrom the headers. - Concatenate the timestamp and the raw request body (exact payload, unmodified).
- Generate an HMAC-SHA256 hash of this string using your client secret.
- Base64-encode the hash.
- Compare it with the
x-webhook-signatureheader value. If they match, the webhook is valid.
Sample Code
IPs to whitelist
When you decide to consume the webhooks, first, you need to verify if your systems need an IP whitelisting to be done at your end or not. Accordingly you can whitelist the below IPs of Cashfree:| Sandbox |
|---|
| 52.66.25.127 |
| 15.206.45.168 |
| Prod |
|---|
| 52.66.101.190 |
| 3.109.102.144 |
| 3.111.60.173 |
| 18.60.134.245 |
| 18.60.183.142 |
| Port |
|---|
| 443 (secured) |