UPI Intent
Accept payments from your customers via UPI app on your mobile that supports the Intent flow using Razorpay.
You can make UPI payments easier for your customers by enabling UPI Intent on your application Checkout.
Enjoy the benefits such as higher conversion rates, decrease in abandoned carts and a decrease in time to complete the payment. Your customers are also benefitted in the following ways:
- No need to handle push or SMS notifications
- No need to switch between applications to complete a payment (merchant, SMS and app)
- No need to remember their VPAs
The payment flow for UPI Intent payments is given below.
-
In the UPI Intent flow, the customer selects UPI as the payment method on your website or app. A list of UPI apps supporting the intent flow is displayed.
Watch Out!
By default, the top PSP apps appear on the customer's mobile irrespective of the installation status of the UPI apps.
-
The customers select their preferred app. The UPI app opens with pre-populated payment details.
-
The customers enter their UPI PIN to complete their transactions.
-
After the payment is successful, the customers are redirected to your app or website.
Use the Android SDK to support UPI Intent payments when a payment is processed through Razorpay in a WebView inside an app.
and include it in the
libs
folder.To initiate the SDK, call the Razorpay class constructor in your project and pass key
as Razorpay API key and webView
as the object that handles the payment flow.
import com.razorpay.RazorpayRazorpay razorpay = new Razorpay(key, webView, activity);
After UPI is selected as the payment method, Razorpay invokes the Intent Flow page that lists all the available intent flows for the user to select and make the payment. Upon payment completion, the UPI app returns the result back to your activity
in onActivityResult
method. This should be passed to Razorpay as shown below:
@Overrideprotected void onActivityResult(int requestCode, int resultCode, Intent data) {super.onActivityResult(requestCode, resultCode, data);if (requestCode == Razorpay.UPI_INTENT_REQUEST_CODE) {razorpay.onActivityResult(requestCode, resultCode, data);}}
Following are the best practices to be followed to accept online payments using UPI intent flow. You should show the list of UPI apps in 2 sections:
- Top performing apps (GPAY > PhonePe > Paytm > BHIM)
- Other apps
Was this page helpful?