Payment Methods
Integrate different payment methods in Razorpay Android Custom SDK Checkout.
The Razorpay Android Custom SDK lets you integrate the supported payment methods on your Android app's Checkout form.
Use the
to fetch the payment methods available for your account.Below are the sample payloads for each payment method.
There are no specific request parameters to be passed. Instead, you must pass the fetchVirtualAccount method for your Customer Identifier to get created and the details to appear on the checkout. Know more about
For Card payments, method should be specified as card. Other required fields:
card[name]card[number]card[cvv]card[expiry_month]card[expiry_year]
The sample code shown below allows the checkout to accept a card payment of ₹299.35.
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("currency", "");data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "+919876543210");data.put("method", "card");data.put("card[name]", "Gaurav Kumar");data.put("card[number]", "4628 9499 7226 2986");data.put("card[expiry_month]", "12");data.put("card[expiry_year]", "30");data.put("card[cvv]", "100");
Check the
.If you want to securely store customer's card details as network tokens, know about
.For EMI, method should be specified as emi. Add an additional field, emi_duration, corresponding to the number of months for EMI. After a customer selects the desired plan, pass the corresponding value in the emi_duration field.
The sample code below allows checkout to accept a card payment of ₹3999.35:
JSONObject data = new JSONObject();data.put("amount", 399935);data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "+919876543210");data.put("method", "emi");data.put("emi_duration", 2); //defines the number of months for the EMI.data.put("card[name]", "Gaurav Kumar");data.put("card[number]", "4628 9499 7226 2986");data.put("card[expiry_month]", "12");data.put("card[expiry_year]", "30");data.put("card[cvv]", "100");
Check the list of supported
and EMI providers.Cardless EMI is a payment method that allows customers to convert their payment amount to EMIs. The customer does not require a debit or credit card. They can make payments via credits approved by the supported Cardless EMI payment provider.
For Cardless EMI, method should be specified as cardless_emi and an additional field provider must specify the provider with its respective provider code.
Feature Request
This is an on-demand feature. Please raise a request with our
to get this feature activated on your Razorpay account.Watch Out!
The customer should be registered with the cardless EMI payment provider before making the payment.
The sample code below allows checkout to accept a card payment of ₹5999.35:
JSONObject payload = new JSONObject("{\"currency\":\"\"}");payload.put("amount", 599935);payload.put("contact", "+919876543210");payload.put("order_id", "order_9A33XWu170gUtm");payload.put("email", "gaurav.kumar@example.com");payload.put("method", "cardless_emi");payload.put("provider", "walnut369");
Check the
.For Netbanking, method should be specified as netbanking and an additional field bank must specify the bank with its respective bank code.
The sample code shown below allows the checkout to perform a netbanking transaction for a payment of ₹299.35:
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "+919876543210");data.put("method", "netbanking");data.put("bank", "SBIN");
Check the
.You can enable your customers to make payments using the Pay Later service offered by various third-party providers.
For pay later, method should be specified as paylater and an additional field provider must specify the provider with its respective provider code.
Use the sample code given below:
JSONObject payload = new JSONObject("{\"currency\":\"\"}");payload.put("amount",5000);payload.put("contact","+919876543210");payload.put("order_id","order_9A33XWu170gUtm");payload.put("email", "gaurav.kumar@example.com");payload.put("method", "paylater");payload.put("provider", "lazypay");
Check the
.For Wallet payments, method should be specified as wallet.
The sample code shown below allows the checkout to perform a wallet transaction for a payment of ₹299.35 :
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "+919876543210");data.put("method", "wallet");data.put("wallet", "mobikwik");
Check the list
.For UPI payments, method should be specified as upi. The SDK supports two flows:
- Intent
- Collect
UPI Collect Flow Deprecated
According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers.
Exemptions: UPI Collect will continue to be supported for:
- MCC 6012 & 6211 (IPO and secondary market transactions).
- iOS mobile app and mobile web transactions.
- UPI Mandates (execute/modify/revoke operations only)
- eRupi vouchers.
- PACB businesses (cross-border/international payments).
Action Required:
- If you are a new Razorpay user, use .
- If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the .
Handy Tips
If your application targetSdkVersion is 30 or above, add the following code in your app's manifest file to support the UPI Intent flow.
<queries><!-- List of apps which you want to support for Intent pay --><package android:name="com.google.android.apps.nbu.paisa.user" /><package android:name="com.phonepe.app"/><!--Specific intents you query for,eg: for a custom share UI--><intent><action android:name="android.intent.action.SEND" /></intent></queries>
In Intent Flow, the SDK invokes a UPI intent, which is handled by the UPI apps installed on the Android device.
To implement this flow:
-
Fetch a list of apps on the customer's device that support UPI payments and Autopay using the sample codes given below:
-
Fetch list of UPI Supported Apps
Razorpay.getAppsWhichSupportUpi(this, new RzpUpiSupportedAppsCallback() {@Overridepublic void onReceiveUpiSupportedApps(List<ApplicationDetails> list) {// List of upi supported app}}); -
Fetch list of UPI Autopay Supported Apps
Razorpay.getAppsWhichSupportAutopayIntent(this, new RzpUpiSupportedAppsCallback() {@Overridepublic void onReceiveUpiSupportedApps(List<ApplicationDetails> applicationDetailsList) {}});
-
-
Override the
onActivityResult()of your activity and pass the same to our SDK:@Overrideprotected void onActivityResult(int requestCode, int resultCode, Intent data){super.onActivityResult(requestCode, resultCode, data);if(razorpay!=null){razorpay.onActivityResult(requestCode,resultCode,data);}} -
Invoke the UPI and UPI Autopay Intent with the sample codes given below. This will enable the customer to select the desired application.
-
Invoke UPI Intent
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "+919876543210");data.put("method", "upi");data.put("_[flow]", "intent");data.put("upi_app_package_name", "in.org.npci.upiapp"); //For BHIM app -
Invoke UPI Autopay Intent (Default)
JSONObject data = new JSONObject("{currency: ''}");data.put("amount", "10000");data.put("contact", "+919876543210");data.put("email", "gaurav.kumar@example.com");data.put("order_id", "order_DgZ26rHjbzLLY2");// mandatory for UPI Autopay paymentsdata.put("customer_id", "cust_805c8oBQdBGPwS");// mandatory for UPI Autopay paymentsdata.put("recurring", "1");data.put("description","Credits towards consultation");data.put("method", "upi");data.put("_[flow]", "intent");data.put("upi_app_package_name","com.google.android.apps.nbu.paisa.user"); // pass package name that is returned in getAppsWhichSupportUpi and/or getAppsWhichSupportUpiAutopay -
Preferred Payload for Recurring: In the sample code below,
recurringis passed aspreferred. It initiates a flow in SDK where, if a selected app supports Autopay payments, the payment passes via the Autopay payment route. If it does not, then it passes via the one-time payment route.JSONObject data = new JSONObject("{currency: ''}");data.put("amount", "10000");data.put("contact", "+919876543210");data.put("email", "gaurav.kumar@example.com");data.put("order_id", "order_DgZ26rHjbzLLY2");// mandatory for UPI Autopay paymentsdata.put("customer_id", "cust_805c8oBQdBGPwS");// mandatory for UPI Autopay paymentsdata.put("recurring", "preferred");data.put("description","Credits towards consultation");data.put("method", "upi");data.put("_[flow]", "intent");data.put("upi_app_package_name","com.google.android.apps.nbu.paisa.user"); // pass package name that is returned in getAppsWhichSupportUpi and/or getAppsWhichSupportUpiAutopay
-
Check the complete list of
.In the Intent Flow, you can customise the order in which UPI apps appear at the Checkout. There are two sections within the app: Preferred Apps and Other Apps.
To define the order in which apps appear under these sections of the app chooser, two lists that contain the application package names must be passed to the SDK within options.
- Preferred apps list
- Other apps list
PREFERRED APPS Section
This section displays the list of applications specified using the key preferred_apps_order within options. If no application exists for this key, this section is not displayed.
OTHER APPS Section
The list of applications specified using the key other_apps_order within options is displayed under this section. Any unspecified app (which supports UPI intent) appears subsequent to the list passed in the options.
In the sample code below, BHIM (in.org.npci.upiapp) is passed in the preferred apps list and Google Pay(com.google.android.apps.nbu.paisa.user) in other apps list. As a result, BHIM is shown in the PREFERRED APPS SECTION. Google Pay is shown at the top in the OTHER APPS SECTION followed by other apps present in the device:
JSONArray prefAppsJArray = new JSONArray();prefAppsJArray.put("in.org.npci.upiapp");JSONArray otherAppsJArray = new JSONArray();otherAppsJArray.put("com.google.android.apps.nbu.paisa.user");payload.put("method", "upi");payload.put("_[flow]", "intent");payload.put("preferred_apps_order", prefAppsJArray);payload.put("other_apps_order", jArray);
Customers enter their vpa or
You can now pass the vpa parameter in the upi array as shown below.
The sample code below sends a collect request to gaurav.kumar@exampleupi handle.
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "+919876543210");data.put("method", "upi");data.put("vpa", "gaurav.kumar@exampleupi");
You can accept UPI payments using phone number for the collect flow. Follow the steps given below:
- You must collect the customer's phone number from your end.
- Check if any
vpais associated with the given number and get thevpa_tokenfor that number using the sample code given below:razorpay.isValidVpa("+919876543210", new ValidateVpaCallback() {@Overridepublic void onResponse(JSONObject response) {if (response.has("error")) {// Error: no VPA associated with the given number} else if (response.has("success")) {// VPA Validation Successful// Get and store response.vpa_token for initiating payment// You will get response.masked_vpa in this response which you can show to the end user}}@Overridepublic void onFailure() {// Called in cases where the number is empty or when the device is not connected to data to make the validation}}); - Pass the
vpa_tokenparameter in theupiarray as shown below:JSONObject data = new JSONObject();data.put("amount", 29935);data.put("order_id", "order_DgZ26rHjbzXXXX");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "+919876543210");data.put("method", "upi");data.put("vpa_token", "f731951149df8903d374b117f921ab41");