I have deeplinked UPI apps from my android native app using intent. I have tested this with various UPI apps like BHIM, PhonePe, AXIS, UnionBank, Pockets etc.
I created push payment URI. I am able to launch various UPI apps. However behaviour is quite inconsistent.
"upi://pay?pa=xxxxx@upi&pn=payee&am=5.00&tn=Test_Transaction"
- Most apps are responding when intent is onvoked. They get launched.
- few apps displayed the payment page correctly with amount. Rest apps did not display the page at all. PhonePe, Axis displayed. BHIM did not display payment page
- Payment completed successfully b y PhonePay and Axis ONLY
- After UPI payment was completed successfully, the UPI app is closed and control comes back to my app. However the response data is always NULL. NONE of the app is providing response data when payment is successful
- If payment fails or I cancel the payment in UPI app or I do not enter right PIN and close UPI app, most of the apps do not return response data.
- Only AXISPay returned response data : Intent { (has extras) }
Anyone - any comments? Why such inconsistent bahaviour?
Surprising is deeplinking not working with BHIM app.
I can share android code if someone want want to try.
It really works for the BHIM application also. Use this Code it works like a charm for every PSP enabled applications.
Then pass the parameters in the method and pass the string to the Intent in this way:
For displaying payment page correctly, you have to
setAction(Intent.ACTION_VIEW)
on your intent.I am getting response only from BHIM app by using
getStringsExtra("response")
on Intent data.