Try Free on RapidAPI →

Razorpay Webhook for SaaS — Production Integration Guide

How to integrate and process Razorpay webhooks for SaaS. Includes normalized payload example and production-ready code.

‌⚡ Translate webhooks automatically — Free on RapidAPI
No code · <100ms response · Stripe · Shopify · PayPal · Square · Braintree · Razorpay

What does "process and normalize webhook from Razorpay" mean?

When Razorpay fires a payment event, its webhook body contains dozens of nested fields specific to its internal data model. To process and normalize webhook means extracting only the relevant data and converting it to a flat, universally consumable format — without any custom parsing logic on your end.

The normalized output always follows the same 6-field schema regardless of the source platform:

{
  "platform":       "razorpay",
  "transaction_id": "pi_3ABC...",
  "amount":         49.99,
  "currency":       "USD",
  "customer_email": "buyer@example.com",
  "payment_status": "succeeded"
}

Raw Razorpay webhook example

This is the actual payload Razorpay POSTs to your server endpoint:

{
  "entity": "event",
  "event": "payment.captured",
  "payload": {
    "payment": {
      "entity": {
        "id": "pay_ABC123",
        "amount": 4999,
        "currency": "INR",
        "email": "buyer@example.com",
        "status": "captured"
      }
    }
  }
}

As you can see, the object contains dozens of fields irrelevant to most integration use cases. The Webhook Translator API strips the noise and returns only the essential contract.

How to process and normalize webhook from Razorpay in under 60 seconds

Option 1 — API call (recommended)

Forward the raw webhook with a single query parameter:

POST https://webhook-translator-microapi.vercel.app/?plataforma=razorpay
Content-Type: application/json
X-RapidAPI-Key: YOUR_KEY

[Razorpay webhook body here]
✓ No parsing code to maintain ✓ <100ms response time ✓ 500 free calls/month

Option 2 — Manual Node.js parser

// ⚠ You must maintain this code on every Razorpay API update
const amount = event.data.object.amount_received / 100;
const email = event.data.object.customer_email
           ?? event.data.object.billing_details?.email;
// ... 20+ more lines to handle all edge cases and platform versions
✗ Breaks on every gateway API update ✗ Multiply this by 3-6 platforms

Stop writing payment webhook parsers

One API that normalizes Stripe, Shopify, PayPal, Square, Braintree and Razorpay into a single flat JSON contract. 500 free calls/month.

Get free access →

Related documentation