Urgent.News

What's breaking now, across hundreds of outlets.

Finance & Markets

Verifying payment webhooks from Indian gateways

In short Six gateways use five different ways to prove a webhook is real. What matters is what each proof covers. Razorpay and Cashfree sign the whole body. Only Cashfree also signs a timestamp, which stops old requests being replayed. PayU and Easebuzz hash only some fields. PhonePe and Juspay sign nothing in the body, so check the order with the gateway before you ship. Verify the raw bytes,…

To verify webhook requests from Indian payment gateways, six providers use five different methods. Razorpay and Cashfree both sign the entire request body with HMAC-SHA256, while PayU and Easebuzz hash only some fields. PhonePe and Juspay do not sign any data in the body; instead, they require verification of the order and credentials.

Cashfree's signature includes a timestamp, providing replay protection by rejecting requests older than five minutes. Verification should focus on the covered data, not the hash function used. Developers must account for differences in how each gateway processes the body, such as parsing JSON differently, handling duplicate fields, and de-duplicating on signed fields.

The india-webhooks package standardizes verification across all six gateways, providing a consistent event shape.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Finance & Markets

More from Thursday 26 November →