UPI Payment Integration for Apps and Websites: How It Works and What to Test
UPI is how most people in India pay inside apps and on websites. Integrating it is usually done through a payment gateway, but the details matter: which flow you use, how you confirm payment and how you handle the cases where something goes wrong.
In this guide 8 sections
Payments are where a small bug costs real money and real trust. When we integrate UPI, the payment screen is the easy part. The careful work is in confirming payments on the server and handling every failure case.
The rule
The app starts the payment. The server decides whether it succeeded, based on the payment provider's confirmation.
The main UPI flows
| Flow | How it works | Suits |
|---|---|---|
| Intent | Opens the user's UPI app to approve | Mobile apps and mobile web |
| QR code | User scans a dynamic QR with any UPI app | Desktop checkout, counters, invoices |
| Collect request | User enters a UPI ID and approves a request | Some web checkouts; check current gateway support |
| Autopay | A recurring mandate approved once | Subscriptions and instalments |
NPCI's UPI overview explains the underlying system. Rules evolve, so check your gateway's current documentation for supported flows.
Choosing a payment gateway
- Supported methods: UPI, cards, net banking, wallets, EMI.
- Subscriptions and autopay support.
- Split payments for marketplaces, such as Razorpay Route.
- Quality of documentation, webhooks and test mode.
- Settlement times, dashboards and support.
How a safe integration works
- Your server creates an order with the gateway and records it as pending.
- The app or website opens the UPI flow using that order.
- The user approves the payment in their UPI app.
- The gateway notifies your server through a signed webhook.
- Your server verifies the signature and amount, marks the order paid and fulfils it.
- The app checks the order status from your server and shows the result.
Adding payments to your product?
Book a free 30-minute call. We will help you choose a payment flow and plan the edge cases.
Book a free 30-minute call →Edge cases to test
- The user closes the UPI app without paying.
- The payment succeeds but the user never returns to your app.
- The webhook arrives late, twice or before the app checks status.
- The payment is pending for several minutes.
- Money is debited but your order creation failed.
- No UPI app is installed on the device.
- Partial or full refunds, and their status updates.
Reconciliation
Every day, compare your orders with the gateway's settlement reports. Any payment without a fulfilled order, or any order without a confirmed payment, should be flagged and resolved automatically where possible. This is what keeps support tickets low.
Security
- Keep gateway keys on the server only, never in the app.
- Verify webhook signatures and amounts.
- Use idempotency so a repeated webhook does not fulfil twice.
- Log every status change for audits.
The wider checklist is in our mobile app security checklist. Building a regulated financial product? Read how to build a fintech app in India.
How we integrate payments
At Creuto we integrate UPI and other payment methods with server-side confirmation, reconciliation and clear customer messages for every failure case.
Frequently asked questions
Can I integrate UPI without a payment gateway?
Most businesses use a licensed payment gateway or aggregator, which handles the connection to banks and UPI, settlements and compliance. Direct integration is generally done by banks and larger regulated players.
What is the UPI intent flow?
On a phone, the app opens a list of UPI apps installed on the device, the user picks one, approves the payment there and returns to your app. It is the most common flow in mobile apps.
What is UPI autopay?
UPI autopay lets customers approve a recurring mandate once, after which subscription or instalment payments are collected automatically within the limits they approved.
How do I know a UPI payment succeeded?
Never rely only on what the app reports. Confirm the payment on your server using the gateway's webhook or status API before you fulfil the order.
What happens if the money is debited but the order fails?
Your system should detect the mismatch through reconciliation, then either complete the order or refund automatically, and tell the customer clearly what happened.
Need reliable payments in your app?
We integrate UPI, cards, subscriptions and split payments, with server-side checks and proper reconciliation.