Payment Gateway Integration Website India (2026): Razorpay, UPI & Webhooks
Payment gateway integration website india—Razorpay vs Cashfree, hosted vs custom checkout, UPI UX, webhooks, PCI, INR costs & 15 FAQs for ecommerce and SaaS.
DigitalXBrand Team
Web Development & Payments
Priya's Noida ecommerce startup lost ₹2.3 lakh in a single sale weekend—not to fraud, but to flaky payment callbacks. Customers paid via UPI; the success page showed confirmation, but webhooks never updated order status. Warehouse shipped late, support tickets spiked, and Meta ads were paused until checkout was rebuilt with idempotent webhook handlers and Razorpay signature verification.
If you are researching payment gateway integration website india, you need more than API copy-paste. This 2026 guide covers Razorpay vs Cashfree vs PayU, hosted vs custom checkout, UPI-first UX, webhook architecture, PCI scope, GST invoicing, INR integration costs, and testing checklists for SMB ecommerce, SaaS subscriptions, and marketplace founders.
🛡 Integration reality
The gateway is rarely the bottleneck—your order state machine, webhook retries, and mobile checkout UX determine whether revenue lands in your bank account or disappears in support chaos.
- Choosing a payment gateway for Indian websites
- Hosted checkout vs custom API integration
- Razorpay integration flow: keys, webhooks, testing
- UPI, cards, and subscription billing patterns
- PCI scope, KYC, and GST invoicing basics
- 15 FAQs on payment gateway integration website india
Need reliable payment integration?
DigitalXBrand integrates Razorpay and Cashfree on Next.js and Node—with webhook hardening and mobile-first checkout for Indian buyers.
Choosing a Payment Gateway in India
| Gateway | Best for | Typical MDR | Developer experience |
|---|---|---|---|
| Razorpay | Startups, SaaS, D2C | ~2% + GST | Excellent docs, subscriptions |
| Cashfree | Ecommerce, marketplaces | ~2% + GST | Strong payouts API |
| PayU | Established merchants | Negotiable | Mature, varied plugins |
| CCAvenue | Legacy ecommerce | Negotiable | Wide method support |
Compare settlement speed, UPI success rates, refund APIs, and dashboard reporting—not headline rates alone. High-volume merchants negotiate MDR above ₹50 lakh monthly GMV.
Hosted Checkout vs Custom Integration
When to use each model
- Hosted checkout: fastest launch, lowest PCI scope, less UX control
- Embedded iframe: moderate customization, gateway handles card fields
- Custom API checkout: full branded UX, requires rigorous webhook and security design
- Payment links: invoices, WhatsApp sales, low dev overhead
💡 Mobile-first rule
Design checkout for UPI on Android first. Indian conversion drops sharply when users must hunt for UPI among rarely used methods.
Razorpay Integration Flow on Custom Websites
- Complete business KYC on Razorpay dashboard
- Generate test API keys; never commit live keys to git
- Create order server-side; pass order_id to checkout
- Handle success/failure client callbacks as UX only—not source of truth
- Verify webhook signatures; update orders idempotently by payment_id
- Test refunds, partial captures, and timeout scenarios in sandbox
Next.js and Node stacks should place secret keys in server environment variables only. Use API routes or backend services for order creation—never expose key_secret in browser bundles.
⚠ Webhook failure pattern
Teams that trust client-side success redirects without webhooks lose 2–5% of orders on mobile networks. Always reconcile payments server-side.
Subscriptions, SaaS Billing, and Marketplaces
SaaS companies use Razorpay Subscriptions or Cashfree recurring plans with mandate flows. Implement handlers for subscription.charged, payment.failed, and cancellation events. GST-compliant invoices may require additional fields and ERP export.
Marketplaces need split settlements and vendor KYC—Cashfree and Razorpay Route-style products handle splits; scope this early to avoid rebuilding checkout.
PCI, KYC, and Integration Cost in INR
| Scope | Dev cost | Timeline |
|---|---|---|
| Standard hosted checkout | ₹15,000–₹40,000 | 1–2 weeks |
| Custom checkout + webhooks | ₹40,000–₹1,20,000 | 2–4 weeks |
| Subscriptions + invoicing | ₹1,00,000–₹3,00,000 | 4–8 weeks |
| Marketplace splits | ₹2,00,000–₹5,00,000+ | 8–16 weeks |
Building ecommerce end-to-end?
Pre-Launch Testing Checklist
Payment go-live checklist
- Sandbox success, failure, and timeout flows verified
- Webhook signature validation with replay protection
- Order states: created → paid → fulfilled → refunded
- UPI collect and QR flows tested on real Android devices
- GST invoice PDF or email generated correctly
- Refund and partial refund tested in dashboard + API
- Live keys rotated; secrets in env vars only
Frequently Asked Questions
15 answers to payment gateway integration website india—Razorpay, UPI, webhooks, PCI, costs, and SaaS billing.
How do I integrate a payment gateway on my website in India?+
Which payment gateway is best for Indian websites?+
How much do payment gateways charge in India?+
What is the cost to integrate Razorpay on a website?+
Do I need PCI DSS compliance for payment gateway integration?+
Can I accept UPI payments on my custom website?+
How long does payment gateway integration take?+
What are webhooks and why do they matter for payments?+
Shopify vs custom site: how does payment integration differ?+
How do I handle failed payments on Indian ecommerce sites?+
Can SaaS companies in India use Razorpay subscriptions?+
What documents are needed for payment gateway KYC in India?+
Is it safe to store customer card data on my server?+
How do I test payment integration before going live?+
Why choose DigitalXBrand for payment gateway integration in India?+
Conclusion: Payments Are Infrastructure, Not a Plugin
Payment gateway integration website india projects succeed when checkout is mobile-native, webhooks are reliable, and order logic survives real-world network failures. Choose hosted flows when speed matters; invest in custom checkout when UX and upsells drive margin.
Test like a customer on Jio 4G, reconcile like an accountant, and never ship without webhook idempotency.
Ship payments that do not leak revenue
DigitalXBrand integrates Indian payment gateways on production-grade Next.js stacks—with Razorpay, Cashfree, subscriptions, and marketplace payouts.
Tags