Skip to main content

UPI Intent Support: Target SDK Version 30+

If your application targetSdkVersion is 30 or above, add the following code in your app’s manifest file to support the UPI Intent flow.
AndroidManifest.xml
Handy Tips
  • Refer to the list of supported UPI apps.
  • Additionally, we recommend you to create 2 sections - Primary and Others. Under Primary, display the following 4 apps:
  • GPay
  • PhonePe
  • Paytm
  • BHIM

UPI Intent on Recurring Payments

Configure and initiate a recurring payment transaction on UPI Intent:
Watch Out!This is an on-demand feature. Please raise a request with our Support team to get it enabled on your Razorpay account.
Java

Card Utilities

You can use these methods for card payment method integration.

Fetch Card Network

The SDK provides a method to get the card network name of the provided card number.
  • At least 6 digits of the card number are required to identify the network.
  • Possible values returned by this method are visa, mastercard and unknown.
  • If it is not able to identify the network it returns unknown.
Fetch Card Network

Validate Card Number

You can determine the validity of the card number entered using the isValidCardNumber method. This is a checksum-based method to determine if the entered card number is valid or not.
Card Number Validation

Fetch Card Number Length for Card Network

You can fetch the length of a card number for a specific card network using the getCardNetworkLength method.
Fetch Length for Card Network
You can use the respective methods to fetch:

Fetch Bank Logo URL

The SDK provides a method to fetch the bank logo’s URL, here bankCode is the code of bank, you will be able to get it from the response received in onPaymentMethodsReceived callback.
Fetch Bank Logo URL

Fetch Wallet Logo URL

The SDK provides a method to get the wallet logo’s URL.
Fetch Wallet Logo URL

Fetch Wallet Square Logo URL

The SDK provides a method to get the wallet’s square-shaped logo’s URL.
Fetch Wallet Square Logo URL

Data Validation

The SDK provides basic validation for the payment data JSONObject. In case of a validation error, the SDK returns an error map in the onValidationError callback function.

Sample Code

The sample code shown below describes a validation error on the contact field:
Data Validation

Custom WebViewClient and WebChromeClient

Our SDK sets an instance of RazorpayWebViewClient and RazorpayWebChromeClient to the Webview passed to facilitate bank page optimizations. If you want to set your own custom WebViewClient you have to extend RazorpayWebViewClient and pass it to our SDK.
Watch Out!This step is optional and is only required when you want to set a custom WebViewClient/WebChromeClient

Sample Code

The sample code given below shows how to customize the RazorpayWebViewClient:
Customize RazorpayWebViewClient
Similarly, you can set your own WebChromeClient:
Set WebChromeClient