UPI Integration in Your App: The 2026 Technical Guide
UPI processed over 14 billion transactions in a recent month. If your app handles payments in India, UPI is almost certainly one of them. Here's the technical guide every developer integrating UPI in 2026 should read.
Key takeaways
- Three main UPI flows: Collect (pull from VPA), Intent (deep-link to UPI app), AutoPay (recurring mandate).
- You don't integrate UPI directly, you integrate a payment gateway (Razorpay, Cashfree, PayU, PhonePe Business, Paytm Business) that handles the NPCI mechanics.
- Webhook reliability is the difference between a working integration and an operational nightmare.
- Refunds, partial refunds, recon, and dispute handling are where 80% of the operational work lives.
Why this matters
UPI conversion rates in well-implemented integrations are typically 15-30 percentage points higher than card flows. Botching the integration leaves real money on the table, both in immediate conversion and in repeat-purchase friction.
The three primary flows
Collect
You request payment from a customer's UPI ID (VPA). They get a notification in their UPI app, approve, and the money moves. Best for: customer-initiated checkouts where you have their VPA ahead of time. Conversion rate: lower than Intent because customer has to leave your app.
Intent
You generate a UPI deep-link with payment details, customer's UPI app opens, pre-filled. Customer confirms in their app. Best for: web and mobile checkouts. Conversion rate: highest, especially on mobile.
AutoPay (UPI mandates)
Recurring mandates. Customer approves once (with mandate amount cap), subsequent debits happen without approval up to the cap. Best for: subscription apps, EMI, recurring bills.
Choosing a payment gateway
Razorpay, Cashfree, and PayU are the big three in India. They handle the NPCI rails, dispute management, and provide SDKs. Differences:
- Razorpay: most developer-friendly docs and SDKs, strongest checkout UX.
- Cashfree: competitive pricing, strong on payouts.
- PayU: enterprise relationships, strong on international.
PhonePe Business and Paytm Business also exist, they have the volume advantage of their own UPI apps but more limited gateway ecosystems.
Edge cases that will bite you
Successful payment, failed callback. Money moves, your webhook fails. The payment gateway will retry. Your idempotency must be airtight.
Pending state. UPI doesn't always resolve immediately. Your UI must show a "we're checking" state and your backend must poll status.
Customer closes app mid-payment. Status is ambiguous. Poll the gateway's status API.
Refund timing. UPI refunds can take 24-72 hours to reflect in customer's account. Set expectations clearly in the UI.
Reconciliation. Daily settlement files from the gateway need to be matched to your transaction records. Build a recon job from day one.
Common pitfalls
The most common is trusting the redirect-back URL parameters as truth. They can be tampered with. Always verify via server-side webhook + status API call.
The second is missing the idempotency key on the create-order call, leading to duplicate orders if your retry logic fires.
The third is underestimating the operational load of dispute handling. Build a dashboard for it.
What we recommend
Start with Razorpay if you don't have an existing relationship, fastest time-to-launch. Use their hosted checkout for the first version; migrate to custom UI only when you have a reason. Build idempotency, webhook reliability, and recon as first-class engineering concerns, not afterthoughts.
FAQs
What about UPI Lite? For sub-₹200 transactions, faster but with a wallet-style cap. Most gateways support it.
Is there a UPI gateway with the lowest fees? Fees vary 1.5-2.5% for most transactions; differences are smaller than people think. Choose on developer experience, not 10 basis points.
Can we do peer-to-peer payments in our app? No, only business UPI handles are eligible for merchant collection. Gateways issue these on your behalf.
International UPI? Limited but expanding (UAE, Singapore, France). Check current gateway support.
