BlogIndia

UPI deep link or app link? Opening the right payment screen in your app

· 9 min read · By the Strait team

How a UPI deep link (upi://pay) works on Android and iPhone, why it shouldn't sit inside a short link, and how to send people to your own bill or EMI screen.

Payment links in India come in two kinds. One kind asks a UPI app to pay someone: the upi://pay link. The other kind opens your app on the screen where a payment starts: the bill, the EMI, the wallet top-up, the order that's waiting. Both get called a "payment link", but they behave very differently on a phone.

This post explains what a UPI deep link is, what happens when one is tapped on Android and on iPhone, and how a deep-linking service fits next to it. The short version: let a link bring people to your screen, and let your app start the UPI payment from there.

A UPI deep link is a URL with the upi scheme and the pay path. It carries the payee and the payment details as query parameters. Google's guide for accepting Google Pay inside an Android app lists the ones you'll see most often:

Parameter Meaning
pa Payee VPA (the UPI ID you are paying)
pn Payee name
mc Merchant category code
tr Transaction reference you generate
tn Transaction note
am Amount
cu Currency, INR
url A URL with details of the transaction

A full link looks like upi://pay?pa=shop@okbank&pn=Hilltop%20Shoes&tr=ORD1042&am=499.00&cu=INR. When an app opens it, the UPI app shows a payment screen with those details filled in, and the person approves it with their UPI PIN.

Two lines from Google's guide matter more than the parameter table. First: "NPCI requires that you support the generic intent call in all cases." You may add a button for one specific UPI app, but the plain upi://pay intent, which any UPI app can answer, has to work too. Second, Google tells you to check with your payment service provider or aggregator that the correct amount was paid before you fulfil the order, to prevent fraud. A result handed back by the UPI app is a hint, not proof.

On Android, upi://pay is an implicit intent: your app asks the system "who can handle this?", and every installed UPI app that declares the scheme answers. Android's intents guide describes what happens next: "If multiple activities accept the intent, the system displays a dialog … so the user can pick which app to use." The person can also set one app as the default for that action, and then the dialog stops appearing. Android's guide adds that when the user might want a different app each time, you should show a chooser explicitly with Intent.createChooser(). For payments that's usually right, since many people keep more than one UPI app.

Kotlin
val upi = Uri.parse("upi://pay?pa=shop@okbank&pn=Hilltop%20Shoes&tr=ORD1042&am=499.00&cu=INR")
val pay = Intent(Intent.ACTION_VIEW, upi)
val chooser = Intent.createChooser(pay, getString(R.string.pay_with))
startActivity(chooser)

If you want to show your own list of UPI apps, or hide the UPI button when none is installed, you have to ask Android which apps can answer the intent. Since Android 11 (API level 30), apps that target it see a filtered list of other installed apps. To query for UPI apps you declare the intent in a <queries> element in your manifest:

XML
<queries>
  <intent>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="upi" />
  </intent>
</queries>

Without it, a query for UPI apps can come back empty on a phone that has three of them, and your app wrongly concludes that UPI isn't available.

What happens on iPhone

On iPhone, upi is a custom URL scheme like any other, and UPI apps there register their own schemes. Apple's documentation on custom URL schemes is blunt about the risk: "If multiple apps register the same scheme, the app the system targets is undefined." There's no chooser and no way to change the choice. That's one reason Apple recommends universal links, which are tied to a domain you own, over custom schemes for anything that should open a specific app. For a payment flow on iPhone, check what your payment provider's iOS SDK recommends rather than relying on a bare scheme.

It's tempting to put a upi://pay URL behind a short link, so an SMS reminder can say "pay now" and the tap lands in a UPI app. We advise against it, and in Strait it isn't possible: every link destination must be an https URL. The API refuses anything else with a 400 error, and so do the per-platform fallback fields.

That rule isn't only a technical limit. A short link that jumps into a payment request to someone's VPA looks just like the scam messages people are warned about. A link that opens a screen inside an app they already trust, with their own bill on it, is a much easier tap. It also keeps the amount computed by your server at payment time, not frozen into a URL that may be tapped a week late.

Here is the flow we recommend for bills, EMIs, renewals, top-ups and pending orders:

  1. The link opens your screen. The destination is an https URL on your own domain, such as https://pay.yourapp.com/bill/b_8f2k. The path carries an opaque reference, nothing more.
  2. Your app looks up the details. With the reference, your app asks your server for the bill, checks that the signed-in user owns it, and shows the amount.
  3. Your app starts the UPI intent. The person taps Pay, your app builds upi://pay (or calls your payment provider's SDK) with a fresh transaction reference, and Android shows the chooser.
  4. Your server confirms the payment. The UPI app returns control to your app, and your server checks with your PSP that the right amount arrived before marking the bill paid.

Notice what isn't a link: coming back from the UPI app. That return is the Android activity result (or your provider SDK's callback), not a deep link. No link service is involved in it.

On the Strait side, the link's job is step 1 and the few cases around it. When the app is installed and your App Links are verified, the link opens the bill screen directly. When it isn't installed, the person goes to the store or to your website: you set the default for the workspace and can override it per link with Android, iPhone and desktop fallbacks. On Android, the path survives the install through the Google Play install referrer, so the first launch opens the same bill. iPhone install matching is opt-in. In your app, the SDK hands you the destination's path, and you route it like any other screen, as in Receive links in React Native.

A link is forwarded, screenshotted and previewed by messaging apps. Treat everything in it as public:

  • No VPA, no amount, no phone number, no name in the path or the query string. Put a random reference in the path and look the rest up after sign-in.
  • Make the reference useless on its own. Someone who gets a forwarded link should see a sign-in screen, not the bill.
  • Remember what gets stored. Strait keeps the host and path of each app open for Analytics, never the query string (how we count). An opaque path keeps that record harmless too.

Payment reminders by SMS and WhatsApp

Most payment links in India go out as SMS reminders or WhatsApp messages. Two practical points:

SMS needs DLT. Promotional and transactional SMS in India go through DLT registration, and links in them have to be whitelisted. Your links live on your own subdomain, so you register that one domain in your templates. Our post on DLT SMS links and TRAI URL whitelisting walks through it, and the SMS channel page shows what a tap from the messages app does.

WhatsApp may open its own browser. In some WhatsApp versions on Android, a tap can land in WhatsApp's in-app browser instead of your app. When that happens, the link server shows a short page with an Open in app button. See how to open your app from WhatsApp links for the details.

Label each channel so you can compare them later. A utm_source on the tap URL, such as ?utm_source=sms_reminder, becomes the tap's channel in Analytics. The UTM builder for app links builds those URLs for you.

A bill link from last month shouldn't open last month's bill. Set an expiry on each reminder link, matching the due date or the end of the grace period, and choose what happens after it:

After expiry What the person sees
Expired page (the default) A short "This link has expired" page
Store Google Play on Android, the App Store on iPhone
A web page An https page you choose, such as "View your bills"

For payments, a web page that lists current dues is usually the kindest choice. Taps on expired links are recorded with "Sent to: expired" and aren't billed (When a link expires).

Testing the flow

Test the whole chain on a real Android phone before a reminder campaign goes out:

  • Tap the reminder link from the SMS app and from WhatsApp, once with the app installed and once without. Test my link sends a link to your phone by QR code, SMS or a WhatsApp share and says what each tap should do.
  • Check that the bill screen loads from a cold start, not only when the app is already open.
  • Tap Pay and confirm the chooser lists every UPI app on the phone, which proves your <queries> entry is right.
  • Pay a small real amount and confirm that your server, not the app, marks it paid.
  • Wait until a test link expires and tap it again.

What we haven't tested: we have not run a UPI payment end to end through a Strait link on a real phone, and we haven't tested any of this on a real iPhone. The link half (opening the bill screen, the deferred open after a Play install, expiry) is the same code path as any other Strait link, which we have tested on a real Android phone. The UPI half is your app and your payment provider.

If you run a lending, payments or insurance app, the fintech page covers what your security review will ask.

Sources and how we checked

  • Google Pay for Developers, Support Google Pay for in-app payments (India): the upi://pay parameters, "NPCI requires that you support the generic intent call in all cases", and checking the paid amount with your PSP. Read on 5 October 2026.
  • Android Developers, Intents and intent filters: the chooser dialog, default apps and Intent.createChooser(). Read on 5 October 2026.
  • Android Developers, Package visibility filtering on Android: filtering for apps targeting Android 11 (API level 30) and the <queries> element. Read on 5 October 2026.
  • Apple Developer, Defining a custom URL scheme for your app: "If multiple apps register the same scheme, the app the system targets is undefined." Read on 5 October 2026.
  • The https-only rule for destinations and fallbacks, the expiry options and the channel rule for utm_source are from Strait's link engine code and its short links docs. What app opens store is from the Analytics docs.
  • Deferred links after a Play install were tested on a real Android phone with a Google Play internal testing build (October 2026). On iPhone, Universal Links were tested on a real iPhone (iOS 26) in October 2026; install matching is opt-in (off until you turn it on in Settings → iPhone installs) and proven on iPhone simulators; the real-iPhone run waits on our App Store listing.