Quick Answer
How do I integrate UPI payments into my app in India?
The standard approach is integrating a licensed payment aggregator — Razorpay, Cashfree, or PhonePe Payment Gateway — which provides UPI, cards, and net banking through one API. A production-grade integration with webhook handling and reconciliation costs ₹1,00,000 to ₹3,00,000 and takes 3 to 6 weeks including gateway onboarding.
Source: SmartX Solutions — July 2026
Why UPI Is Non-Negotiable for Indian Products
UPI is not one payment option among many in India — it is the default. NPCI data shows UPI crossed 100 billion transactions in 2023 and now processes over 13 billion transactions every month, dwarfing every other digital payment method in the country. A checkout without UPI does not look incomplete to Indian users; it looks broken.
The good news: you almost never integrate UPI directly. NPCI’s rails are accessed through licensed payment aggregators (PAs), and RBI’s PA licensing regime means a shortlist of well-capitalised providers — Razorpay, Cashfree, PhonePe PG, PayU — compete to give you UPI, cards, net banking, and wallets behind a single API and a single settlement.
Choosing a Gateway: The Decision That Actually Matters
For most products the honest answer is that the big PAs are interchangeable on features and you are choosing on pricing, settlement speed, and support quality. The genuine differentiators worth checking:
| Factor | What to check | Why it matters |
|---|---|---|
| Pricing (MDR) | UPI ~0–0.3%, cards ~1.8–2.5% (negotiable at volume) | Directly hits unit economics |
| Settlement cycle | T+1 standard; instant settlement as paid add-on | Cash flow for thin-margin businesses |
| Payment success rate | Ask for category-specific numbers, not marketing claims | 1% success-rate difference beats any MDR discount |
| Webhook reliability | Retry policy, signature verification, ordering | The backbone of your reconciliation |
| Dashboard & refund ops | Can non-developers issue refunds safely? | Your support team lives here daily |
When you outgrow a single gateway
At scale, serious products run two gateways with routing — for redundancy when one PA has an outage and for leverage when renegotiating MDR. Do not build this on day one; do keep your payment layer behind an internal interface so adding a second provider later is a module, not a rewrite.
The 80%: Failure Handling and Reconciliation
A UPI payment can end in more states than paid or failed: pending (user approved but bank slow), expired (user never approved), deemed (gateway says success, bank settles later), reversed (debited then returned). Your integration must model all of them — the classic Indian checkout bug is treating pending as failed, telling the user to retry, and charging them twice.
Webhooks are your source of truth, and they arrive late, duplicated, and occasionally out of order. Production integrations verify webhook signatures, make every handler idempotent (processing the same event twice must change nothing), and run a daily reconciliation job comparing your orders table against the gateway’s settlement files — because the two will disagree, and the disagreements are where money goes missing.
Refunds deserve first-class treatment: partial refunds, failed refunds that need retrying, and refunds against settled versus unsettled transactions all behave differently. Build the refund flow into your admin panel on day one; support tickets will not wait for phase two.
“The payment API integration takes a week. What takes a month is everything around it — idempotent webhooks, the reconciliation job, refund states, and the admin screens your operations team needs when a customer says they paid and your database says they did not. That month is the actual product.”
Cost, Timeline, and Who Should Build It
A production-grade gateway integration — checkout, webhooks, reconciliation, refunds, admin views — costs ₹1,00,000 to ₹3,00,000 in India and takes three to six weeks including gateway onboarding and certification (merchant KYC alone runs 3–10 working days; plan for it). Subscription billing, split payments, or payouts each add scope.
One architectural note that saves real money: keep card data out of your systems entirely by using gateway-hosted checkouts or tokenisation. Card numbers touching your servers pull you into PCI DSS scope — v4.0 has been fully mandatory since March 2025 — and the cheapest PCI strategy is never being in scope at all. The same logic appears throughout our RBI compliance guide.
If payments are one feature in a larger product, this is standard work for any senior team — including ours; see the fintech development guide for the bigger picture, our notes on payment features in ecommerce builds, or get a fixed-scope integration quote. If payments ARE the product, budget from the fintech cost breakdown instead — the reconciliation and compliance surface grows considerably.
Frequently Asked Questions
How much does payment gateway integration cost in India?
A production-grade integration costs ₹1,00,000 to ₹3,00,000 including webhook handling, reconciliation, and refund flows. A minimal checkout-only integration can cost less but typically gets rebuilt once real transaction volume exposes the missing failure handling.
Which payment gateway is best for startups in India?
Razorpay and Cashfree are the most common startup choices for API quality and onboarding speed; PhonePe PG competes aggressively on UPI pricing. At startup volumes the honest differentiators are settlement speed and support responsiveness rather than features.
Can I integrate UPI without a payment gateway?
Direct UPI integration requires working with NPCI through a bank as a Third-Party Application Provider — viable only for large consumer apps. Everyone else integrates through a licensed payment aggregator, which is faster, compliant, and includes cards and net banking.
What is payment reconciliation and do I really need it?
Reconciliation is the daily process of matching your transaction records against the gateway’s settlement reports. Yes, you need it — webhooks get missed and settlements get adjusted, and without reconciliation those discrepancies silently become accounting losses.
People Also Ask
What MDR do payment gateways charge on UPI in India?↓
UPI MDR for most merchants is zero to 0.3% (government policy has kept person-to-merchant UPI free or near-free), while credit cards run roughly 1.8–2.5%. Gateways monetise UPI through platform fees, value-added services, and instant-settlement charges instead.
How long does Razorpay integration take?↓
The development work for a robust integration takes 2–4 weeks; merchant onboarding and KYC add 3–10 working days in parallel. Simple checkout-button integrations can ship in days but lack the failure handling production traffic requires.
What happens when a UPI payment is stuck in pending?↓
The user approved but the bank has not confirmed. Correct handling: keep the order in a pending state, poll or await the webhook, and never prompt an immediate retry — that is how double charges happen. Most pendings resolve within minutes; your flow should handle hours.


