S2S UPI Intent
Enable direct UPI payments without redirection using EximPe’s server-to-server UPI intent flow
Introduction
The Server-to-Server (S2S) UPI Intent integration eliminates redirection hops by initiating transactions from your backend. Deliver a seamless checkout experience while maintaining control and confidence for your customers.
No Redirect Hops
Initiate transactions directly from your server to improve user experience
Flexible Intent Invocation
Support both generic and app-specific UPI intents on mobile web and Android apps
Robust Server Callbacks
Receive asynchronous status updates via server-to-server callbacks
Intent Invocation
Intent invocation is simply the act of packaging your UPI payment details (amount, payee VPA, reference, etc.) into a deep-link URI and then launching the user’s UPI app directly from your front end. With a specific intent, you target a known app (e.g. Google Pay), while a generic intent lets Android show an app picker (on iOS it falls back to the default handler), all without bouncing users through extra web redirects.
Prerequisites
Before you begin, ensure you have:
- Merchant Key & Salt: Your EximPe merchant key and salt for hash generation.
- Callback URL: A publicly accessible URL configured in your EximPe dashboard for server-to-server callbacks.
- cURL or HTTP Client: Capability to make HTTPS
POST
andGET
requests from your server. - UPI Knowledge: Familiarity with UPI intent URL parameters and encoding.
The following steps allow you to integrate the server-to-server UPI intent:
-
Initiate payment
-
Invoke UPI Intent on customer’s device
-
Check UPI transaction status
-
EximPe sends Server-to-Server callback response
Process flow
Step 1: Initiate payment
Sample UPI Collection Request Body
For the S2S UPI Intent request, you must include these additional parameters beyond the standard checkout fields:
collection_mode
: must be set to"s2s"
upi_flow_type
: must be set to"intent"
buyer.ip_address
: the customer’s device IP addressbuyer.user_agent
: the customer’s browser or app user-agent string
S2S UPI Intent Response
For S2S UPI Intent mode, the response includes:
order_id
: Unique order identifierintent_uri
: UPI intent link that can be used to open UPI apps directly
Explanation of URL Arguments
Argument | Example Value | Required | Description |
---|---|---|---|
pa | merchant@bank | Yes | Payee VPA (Virtual Payment Address) — the merchant’s UPI ID that will receive the payment |
pn | Merchant Name | Yes | Payee Name — the display name of the merchant |
am | 100.00 | No | Amount — the payment amount (decimal, up to two places) |
cu | INR | Yes | Currency — must be INR for Indian rupees |
tr | TXN12345 | Yes | Transaction Reference ID — unique identifier for this transaction (for reconciliation) |
tid | TXNID98765 | No | Transaction ID — a unique transaction ID (sometimes required by specific apps, e.g., Google Pay) |
tn | Order Payment | No | Transaction Note — a short note or description for the payment |
Step 2: Invoke UPI Intent on Customer’s Device
Mobile Web
Invoke a UPI payment on the customer’s mobile device by constructing a UPI intent URL using the intent-uri from the S2S UPI Intent Response
Generic UPI Intent Example
This URL opens the system UPI app picker, allowing the user to choose any installed UPI app to complete the payment.
Specific App Intent Example (Google Pay)
This URL attempts to open the Google Pay app directly (using the gpay://
scheme) with the payment details pre-filled. If Google Pay is not installed or the scheme is not supported in the browser, the intent may fail. Always keep the generic intent as fallback.
UPI App | URL Scheme Prefix |
---|---|
Google Pay | gpay://upi/pay |
PhonePe | phonepe://pay |
BHIM | upi://pay (generic) |
Paytm | paytmmp://pay |
Amazon Pay | amazonpay://upi/pay |
whatsapp://pay | |
Fi Money | fi://upi/pay |
Jupiter | jupiter://upi/pay |
Slice | slice://upi/pay |
Step 3: Check UPI Transaction Status
Invoke the **Order details API **to retrieve the status of the UPI transaction:
For detailed parameters and response formats, see the Get Order API
Step 4: EximPe sends S2S callback response
EximPe can also send a server-to-server callback response whenever the transaction status gets updated.
For more information, see the Payment Successful response
Chrome Intent-Based Deep Links on Android
On Android, Chrome supports an intent-based deep link method that simplifies app invocation and provides built-in fallback mechanisms.
How It Works
-
Intent URL format:
-
scheme: Corresponds to the app’s URL scheme (e.g.,
gpay
,phonepe
). -
package: Android package name for the target app.
-
S.browser_fallback_url: Optional. A URL (typically Play Store link) to redirect users if the app is not installed.
Example (Google Pay)
- Flow:
- Chrome attempts to open Google Pay via
gpay://
. - If installed, the payment screen launches.
- If not installed, the user is redirected to the Play Store.
- Chrome attempts to open Google Pay via
UPI App | Android Scheme | Android Package Name |
---|---|---|
Google Pay | gpay | com.google.android.apps.nbu.paisa.user |
PhonePe | phonepe | com.phonepe.app |
BHIM | upi | in.org.npci.upiapp |
Paytm | paytmmp | net.one97.paytm |
Amazon Pay | amazonpay | in.amazon.mShop.android.shopping |
whatsapp | com.whatsapp | |
Fi Money | fi | com.fi.money |
Jupiter | jupiter | money.jupiter.app |
Slice | slice | com.sliceit.app |
Benefits
- Seamless UX: Direct app launch without intermediate redirects.
- Robust Fallback: Ensures users without the app receive clear next steps (install link).
- Unified Approach: Use a single URL for both deep linking and fallback.