Webhooks are server callbacks to your server from Cashfree payments.
Webhooks are event-based notifications that are received when a specific event related to async bank account verification occurs.
In rare cases, such as network retries, read timeouts, processing delays, or delivery failures, the same webhook might be sent more than once for the same event. To prevent unintended side effects, implement idempotency in your webhook handler to handle duplicate deliveries.
Add your webhook URL in our system for us to deliver webhook events.Follow the instructions below to configure the webhook URL. Ensure to provide the publicly accessible HTTPS URL to your webhook endpoint.
Verifying the signature is mandatory before processing any response. It helps authenticate that the webhook is from Cashfree Payments.Follow the steps to verify the signature:
Sort the array based on keys.
Concatenate all the values in this array and the resultant is the post data (postData).
postData needs to be encrypted using SHA-256 and then base64 encoded.
Verify if both the signature calculated and the signature received match.
Proceed further only if the signatures match. If not, discard the request.
Ensure clientSecret you use is from the oldest active key pair.
For example, from the webhook received, extract the data and pass it to generate HMAC function:
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: