Use this file to discover all available pages before exploring further.
Verifying the signature is mandatory before processing any response. It helps authenticate that the webhook is from Cashfree Payments.Every webhook contains a signature (x-webhook-signature) in the header.The verification process is as follows:
Extract the x-webhook-timestamp from 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-signature header value. If they match, the webhook is valid.
Always use the raw request body and not a parsed JSON object. This prevents signature mismatch.
Reject the webhook if the signature does not match.
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: