To get the list of UPI Apps installed on the user’s device:
Javatry { PhonePe.setFlowId("some id"); List<UPIApplicationInfo> upiApps = PhonePe.getUpiApps(); } catch (PhonePeInitException exception) { exception.printStackTrace(); }
UPIApplicationInfo Model
Javapublic class UPIApplicationInfo { String packageName; String applicationName; Long version; }
Flow Id
- Recommended but not Mandatory.
- It acts as a common ID between the merchant app user journey and PhonePe SDK.
- It can be user id, mobile number or any random id which merchant app logs so that there is a track of user between merchant app and PhonePe SDK.
- It should be alphanumeric string without any special character.