← Back to blog
Web DevelopmentJuly 26, 2026·25 min read

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.

D

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

GatewayBest forTypical MDRDeveloper experience
RazorpayStartups, SaaS, D2C~2% + GSTExcellent docs, subscriptions
CashfreeEcommerce, marketplaces~2% + GSTStrong payouts API
PayUEstablished merchantsNegotiableMature, varied plugins
CCAvenueLegacy ecommerceNegotiableWide method support
Indian payment gateways compared (2026)

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

  1. Complete business KYC on Razorpay dashboard
  2. Generate test API keys; never commit live keys to git
  3. Create order server-side; pass order_id to checkout
  4. Handle success/failure client callbacks as UX only—not source of truth
  5. Verify webhook signatures; update orders idempotently by payment_id
  6. 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

ScopeDev costTimeline
Standard hosted checkout₹15,000–₹40,0001–2 weeks
Custom checkout + webhooks₹40,000–₹1,20,0002–4 weeks
Subscriptions + invoicing₹1,00,000–₹3,00,0004–8 weeks
Marketplace splits₹2,00,000–₹5,00,000+8–16 weeks
Payment integration costs India (2026)

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?+
Choose a PCI-compliant gateway (Razorpay, Cashfree, PayU), complete KYC, create API keys, integrate checkout via hosted page, iframe, or custom API, test in sandbox mode, then go live with webhooks for payment confirmation and order fulfillment.
Which payment gateway is best for Indian websites?+
Razorpay leads for startups and SaaS with strong docs and subscriptions. Cashfree suits ecommerce and marketplaces. PayU and CCAvenue work for established merchants. Compare MDR, settlement speed, UPI support, and developer experience for your stack.
How much do payment gateways charge in India?+
Indian gateways typically charge 2% + GST on domestic cards and UPI (rates vary by volume and method). International cards cost more. Some platforms add platform fees on top. Negotiate custom MDR above ₹50 lakh monthly GMV.
What is the cost to integrate Razorpay on a website?+
Razorpay integration development costs ₹15,000–₹80,000 for standard checkout on custom sites. Subscription billing, marketplace splits, and ERP sync push costs to ₹1–₹5 lakh. Razorpay itself has no setup fee for standard plans.
Do I need PCI DSS compliance for payment gateway integration?+
If you use hosted checkout or redirect flows, the gateway handles most PCI scope. Custom card collection on your domain requires strict PCI compliance—avoid it unless necessary. Tokenization and hosted fields reduce your burden.
Can I accept UPI payments on my custom website?+
Yes. Razorpay, Cashfree, and PayU support UPI via collect requests and QR flows. UPI dominates Indian online payments—ensure mobile-first checkout with UPI apps deep-linked for best conversion.
How long does payment gateway integration take?+
Standard Razorpay or Cashfree checkout on Next.js or Node takes 1–3 weeks including testing and webhooks. Marketplace payouts, subscriptions, and ERP reconciliation add 4–8 weeks. KYC approval timelines vary by gateway.
What are webhooks and why do they matter for payments?+
Webhooks are server-to-server notifications when payments succeed, fail, or refund. Your site must verify signatures and update orders idempotently. Relying only on client-side success redirects loses orders when users close browsers.
Shopify vs custom site: how does payment integration differ?+
Shopify uses built-in checkout with gateway apps—less custom work, more fees. Custom sites integrate APIs directly for branded checkout, flexible upsells, and B2B flows. Indian custom builds almost always use Razorpay or Cashfree REST APIs.
How do I handle failed payments on Indian ecommerce sites?+
Log failures via webhooks, show clear retry UI, send WhatsApp or email recovery links, and monitor UPI timeouts. Indian shoppers often retry on mobile—preserve cart state and offer alternate methods (UPI, cards, netbanking).
Can SaaS companies in India use Razorpay subscriptions?+
Yes. Razorpay Subscriptions supports recurring billing with mandates, trials, and plan changes. Implement webhook handlers for invoice.paid, subscription.charged, and cancellation events. GST-compliant invoicing may need additional configuration.
What documents are needed for payment gateway KYC in India?+
Typically business PAN, GST certificate, bank account proof, signed agreement, website URL with refund policy, and director KYC. Sole proprietors and startups follow simplified routes on Razorpay and Cashfree—allow 3–10 business days for approval.
Is it safe to store customer card data on my server?+
No—never store raw card data on your servers unless you are fully PCI compliant. Use gateway tokens, hosted checkout, or vault features. Indian startups reduce breach risk by keeping payments entirely on gateway-hosted flows.
How do I test payment integration before going live?+
Use sandbox API keys, test cards and UPI IDs provided by the gateway, simulate webhook payloads, verify order states on success/failure/refund, and run end-to-end tests on staging with HTTPS. Switch to live keys only after checklist sign-off.
Why choose DigitalXBrand for payment gateway integration in India?+
DigitalXBrand integrates Razorpay, Cashfree, and custom checkout flows on Next.js and Node—with webhook reliability, GST-ready order flows, and conversion-focused UX for Indian mobile buyers.

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

Payment GatewayRazorpayUPIEcommerceIndiaWebhooksCheckout

Last updated: July 26, 2026 · Written by DigitalXBrand Team

Continue reading

Ready to put these insights into action?

Tell us about your project and we'll help you plan, design, and ship.

Start a conversation