Prerequisites
- A Razorpay account (live or test mode)
- A Razorpay Key ID (
rzp_live_...orrzp_test_...) - A Razorpay Key Secret
- A Razorpay Webhook Secret (set when creating the webhook endpoint)
Setup
Step 1 - Get your Razorpay API Keys
- Go to Razorpay Dashboard > Settings > API Keys.
- Click Generate Key (or use an existing key pair).
- Copy the Key ID (
rzp_live_...) and Key Secret.
Step 2 - Connect in Fluxrate
- Open Dashboard > Integrations.
- Click Connect next to Razorpay.
- Fill in the form:
| Field | Value |
|---|---|
| Connection Name | A friendly label, e.g. Production Razorpay |
| Key ID | Your Razorpay Key ID (rzp_live_...) |
| Key Secret | Your Razorpay Key Secret |
| Webhook Secret | Leave blank for now — you’ll add this after setting up the webhook |
- Click Create Connection. Fluxrate generates a unique Webhook URL for your integration.
Step 3 - Configure the Webhook in Razorpay
- Go to Razorpay Dashboard → Account Settings → Webhooks.
- Click Add New Webhook.
- Paste the Webhook URL from Fluxrate:
- Set a Secret this is your webhook secret. Copy it now.
- Under Active Events, enable:
payment.capturedpayment.failedorder.paidrefund.createdpayment_link.paid
- Click Create Webhook.
Step 4 - Save the Webhook Secret
- Back in Fluxrate, go to Dashboard → Integrations → Manage (Razorpay).
- Paste the webhook secret you set in Razorpay.
- Click Save Changes.
How Payments Work
Fluxrate passesinvoice_id and customer_id in the Razorpay Payment Link notes field. When Razorpay fires a webhook on successful payment, Fluxrate reads these values to identify and update the invoice.
Webhook Payload Handling
Razorpay webhook payloads use a nestedpayload structure. Fluxrate reads from multiple possible locations:
| Field | Source in payload | Purpose |
|---|---|---|
invoice_id | payload.payment.entity.notes.invoice_id or payload.payment_link.entity.notes.invoice_id | Links event to a Fluxrate invoice |
customer_id | payload.payment.entity.notes.customer_id | Links event to a Fluxrate customer |
amount | payload.payment.entity.amount ÷ 100 | Amount in INR (paise → rupees) |
currency | payload.payment.entity.currency (uppercased) | Currency code, e.g. INR |
provider_payment_id | payload.payment.entity.id | Razorpay payment ID (pay_...) |
payment.capturedorder.paidpayment_link.paid
Signature Verification
Fluxrate verifies every Razorpay webhook using HMAC-SHA256:X-Razorpay-Signature request header. Requests that fail verification are rejected with 400 Bad Request.
Managing the Integration
| Action | How |
|---|---|
| Rotate API keys | Manage → enter new Key ID and Key Secret → Save Changes |
| Rotate webhook secret | Manage → enter new webhook secret → Save Changes |
| Temporarily disable | Manage → toggle is_active off → Save Changes |
| Remove entirely | Dashboard → Integrations → ··· → Disconnect |
Troubleshooting
Webhook signature verification failed
Webhook signature verification failed
Fluxrate uses
X-Razorpay-Signature and your stored webhook secret to verify requests via HMAC-SHA256. Ensure the webhook secret in Fluxrate exactly matches the secret you set in the Razorpay Dashboard. Regenerating the secret in Razorpay requires updating it in Fluxrate too.Invoice not marked as paid after payment
Invoice not marked as paid after payment
Confirm that the Payment Link was created with
notes.invoice_id populated. Check Dashboard > Integrations > Webhook Events in Fluxrate to verify the event was received and that event_type is payment.captured or payment_link.paid.Amount appears incorrect on the invoice
Amount appears incorrect on the invoice
Razorpay amounts are in the smallest currency unit (paise for INR). Fluxrate divides by 100 to convert to rupees. If the amounts differ, verify that the Payment Link was created with the correct invoice total.
Only Indian Rupee (INR) supported?
Only Indian Rupee (INR) supported?
Razorpay primarily processes INR. Multi-currency support on Razorpay is limited to specific international payment methods. If your customers are outside India, consider using the Stripe integration instead.