Check Availability of Individual UPI Apps

To check the availability of the individual UPI Apps installed on the user’s device.

isPhonePeAppInstalled()

/**
	* API to see if PhonePe is installed.
	*
	* @param strictCheck - true, if you need to check if PhonePe can be used for payments.    
	*                   	 false, if only need to check PhonePe app is installed
	* @return boolean - true or false.
	*/
try {
	boolean isPhonePeAppInstalled =  PhonePe.isPhonePeAppInstalled(true);
} catch (PhonePeInitException ex) {
	exception.printStackTrace();
}

isGooglePayAppInstalled()

/**
	* API to see if GooglePay is installed.
	*
	* @param strictCheck - true, if you need to check if PhonePe can be used for payments.    
	*                   	 false, if only need to check PhonePe app is installed
	* @return boolean - true or false.
	*/
try {
	boolean isGooglePayAppInstalled =  PhonePe.isGooglePayAppInstalled(true);
} catch (PhonePeInitException ex) {
	exception.printStackTrace();
}

isPayTMAppInstalled()

/**
	* API to see if PayTM is installed.
	*
	* @param strictCheck - true, if you need to check if PhonePe can be used for payments.    
	*                   	 false, if only need to check PhonePe app is installed
	* @return boolean - true or false.
	*/
try {
	boolean isPayTMAppInstalled =  PhonePe.isPayTMAppInstalled(true);
} catch (PhonePeInitException ex) {
	exception.printStackTrace();
}

strictCheck

  • [Highly Recommmended] It should be passed as TRUE to check whether the UPI app can be used for payments. ie. atleast one of the UPI Bank Account is linked in the user’s respective UPI app.
  • It should be passed as FALSE to check whether the UPI app is installed in the user’s device. ie. there are chances that the UPI App is present but none of the UPI Bank Account is linked in the user’s respective UPI app.