×
Search Vriksha Techno Solutions Products, services, case studies, and articles

Building software in Chennai since 2006800+ clients1,200+ projects

Razorpay Payment Gateway Integration: A Practical Checklist

Razorpay Payment Gateway Integration: A Practical Checklist

Short answer: Integrate Razorpay in four steps: create the order on your server, open Checkout, verify the payment signature on the server, and confirm status with signed webhooks. Skipping the last two steps causes most paid-but-unpaid order problems.

A reliable Razorpay integration has four parts: create an order on your server, open Razorpay Checkout in the browser or app, verify the payment signature on your server, and confirm the final status through webhooks. Most payment problems in production, such as paid orders marked as failed or orders processed twice, come from skipping the last two steps. This guide walks through the full flow, subscriptions and UPI AutoPay, and the checklist we use before taking an integration live.

How a Razorpay Payment Flows

  1. Create an order (server). Your backend calls the Orders API with the amount and your own reference number, and receives an order_id. The amount is set on the server, so a customer cannot change it in the browser.
  2. Open Checkout (client). Your website or app opens Razorpay Checkout with that order_id. The customer pays by UPI, card, net banking, wallet or EMI.
  3. Verify the signature (server). Checkout returns a payment ID, the order ID and a signature. Your server recalculates the signature with your secret key and only marks the order paid if they match.
  4. Confirm with webhooks (server). Razorpay sends events such as payment.captured, payment.failed and order.paid to your webhook URL. These arrive even if the customer closes the browser before returning to your site.

Step 4 is the one most often missed. Without it, a customer who pays on UPI and loses network before the redirect will be charged while your system still shows the order as unpaid.

Webhooks: Where Integrations Break

In production, webhooks can arrive late, more than once, or out of order. A solid integration:

  • Verifies the webhook signature using the webhook secret before trusting the payload.
  • Is idempotent: it records each payment ID and ignores repeats, so a duplicate event never ships an order twice.
  • Handles order of events: a payment.failed arriving after a successful retry must not overwrite the paid status.
  • Reconciles daily against Razorpay's own payment records, so any missed webhook is caught and fixed automatically.
  • Responds quickly and does slow work, such as emails and invoices, in a background job.

Choosing the Right Razorpay Product

Your needRazorpay feature
One-time payments on a website or appStandard Checkout with the Orders API
Monthly or yearly plansSubscriptions, with card mandates and UPI AutoPay
Collecting payment over WhatsApp, SMS or emailPayment Links or Payment Pages
Marketplace splitting money between sellersRoute, which transfers each seller's share
Invoices with GST detailsInvoices API, or invoices generated by your own system

Subscriptions and UPI AutoPay

Recurring billing has its own edge cases: a card expires before renewal, a customer upgrades mid-cycle, a UPI mandate is cancelled from the customer's bank app, or a charge fails and needs retries before access is paused. Razorpay's subscription APIs handle much of this, but your system still has to listen for events such as subscription.charged, subscription.halted and subscription.cancelled and update the customer's access accordingly. This matters for SaaS products, memberships and OTT streaming platforms, where access depends on payment status.

One rule to plan for: digital subscriptions bought inside iOS and Android apps follow Apple and Google billing rules. Many businesses take recurring payments through Razorpay on their website and let the app unlock access once the account is active.

Go-Live Checklist

  • Account KYC complete and live keys activated; test keys removed from production.
  • Key secret and webhook secret stored in server environment settings, never in front-end code or the app.
  • Amount and currency set only on the server; amounts sent in paise.
  • Signature verification on every payment; webhook signature verification on every event.
  • Duplicate-event protection and a daily reconciliation job.
  • Refund flow tested, including partial refunds, with the status shown to the customer.
  • Failed, cancelled and pending payments shown clearly, with a retry option.
  • Checkout tested on real phones with UPI apps, not only on desktop.
  • Payment, order and webhook logs kept so support can answer "I paid but…" queries in minutes.

Where We Use This

Payment flows sit at the centre of most products we build, from multi-vendor stores built with our ecommerce development team to rental and booking marketplaces such as our OwnCarz car-rental platform. For marketplaces we use split payments so each seller or partner is paid their share automatically. If you are comparing gateways or planning for newer payment methods, read our guide on how to choose a payment gateway in India.

Need Razorpay Integrated or Fixed?

We integrate Razorpay into websites, Android and iOS apps, SaaS products and marketplaces, and we audit existing integrations that show mismatched or missing payments. If your team prefers to do it in-house, you can hire Laravel developers or Node.js developers from us who have shipped payment flows before. Ask for a Razorpay integration quote or audit.

Frequently Asked Questions

How do I integrate Razorpay into my website?

Create an order on your server with the Orders API, open Razorpay Checkout with that order ID, verify the returned signature on your server, and listen to webhooks to confirm the final payment status.

Why should I use Razorpay webhooks if Checkout already returns a response?

Because the browser response can be lost if the customer closes the page or loses network after paying. Webhooks reach your server directly, so paid orders are never left marked as unpaid.

Does Razorpay support UPI AutoPay for subscriptions?

Yes. Razorpay Subscriptions support recurring payments through UPI AutoPay mandates as well as cards, with events your system can use to renew or pause access.

Can Razorpay split payments between sellers in a marketplace?

Yes. Razorpay Route lets you transfer each seller's share of a payment to their linked account while keeping your commission.

Written by Saiful

Full Stack Developer, Vriksha Techno Solutions Private Limited

Saiful is a full stack developer at Vriksha Techno Solutions, building web and mobile applications and writing about frameworks, APIs and integrations.

Ready to Build Your Next Digital Product?

Our experts will respond within 24 hours with a tailored approach for your project.

Explore eCommerce Services →
  Talk to our expert!

Share Your Project Details

We'll get back within 24 hours.

Never shared.

Build a Scalable, AI-Powered Digital Platform

20+ Years of Expertise
1200+ Projects Delivered
800+ Global Clients
NDA Protected Always

Trusted By Startups And Leading Brands In 12+ Countries

Start the conversation by sharing your goals

—we'll handle the technical strategy to get you there.

20+ Years of Expertise 1200+ Projects Delivered 800+ Global Clients NDA Protected Always
🌐 +91 ▼

Looking for a job?

✓

Thank You!

Thank you! We'll get back to you within 24 hours.

Chat with us