Free 30-minute strategy call with Nihar Scope, budget and a written proposal within 24 hours. Book now
MOBILE ENGINEERING

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.

UPI Payment Integration for Apps and Websites: How It Works and What to Test: guide by Nihar Ranjan Rout
In this guide 8 sections
  1. The main UPI flows
  2. Choosing a payment gateway
  3. How a safe integration works
  4. Edge cases to test
  5. Reconciliation
  6. Security
  7. How we integrate payments
  8. Frequently asked questions

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

FlowHow it worksSuits
IntentOpens the user's UPI app to approveMobile apps and mobile web
QR codeUser scans a dynamic QR with any UPI appDesktop checkout, counters, invoices
Collect requestUser enters a UPI ID and approves a requestSome web checkouts; check current gateway support
AutopayA recurring mandate approved onceSubscriptions 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

  1. Your server creates an order with the gateway and records it as pending.
  2. The app or website opens the UPI flow using that order.
  3. The user approves the payment in their UPI app.
  4. The gateway notifies your server through a signed webhook.
  5. Your server verifies the signature and amount, marks the order paid and fulfils it.
  6. 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.