1

I am working on opening GooglePay, PhonePe or PayTM app when the user taps on Pay via UPI.

According to NPCI docs https://www.npci.org.in/sites/default/files/UPI%20Linking%20Specs_ver%201.6.pdf, when I try to open upi://pay?parm-name=param-value&param-name=pram-value&... or essentially upi:// from mobile browser, it randomly opens any UPI installed application (whatsApp in my case) and if whatsApp isn't installed, it opened PayTM.

I want a behaviour in my app where if a user taps on Pay via GooglePay, GooglePay app should open with prefilled amount and merchant linked to it just like how CRED app does it.

How can I achieve a similar functionality?

PS I tried tez://, it opens GooglePay app but it isn't documented anywhere so I don't know if I can rely on it.

Edit: Can I achieve it without using SDK? I want to use only URL scheme to achieve it.

user12144463
  • 43
  • 1
  • 5
  • People who are downvoting it, can you please comment here why is it being downvoted? – user12144463 Apr 15 '20 at 05:02
  • Can you please share the code for the same you did using tez:// ? – Koustov Basu May 04 '20 at 09:46
  • Did you end up getting it working? If so, do you want to help out with the following [question](https://stackoverflow.com/questions/61529370/how-to-integrate-google-pay-in-ios-swift)? StackOverflow seems to be short of some working code samples for UPI integration on iOS. – Soc May 07 '20 at 08:19

1 Answers1

3

This isn't documented either but the two schemes that you might want to try are:

  • tez://upi/*
  • gpay://upi/*

If I had to take a guess about which one will be better supported it would be the gpay option.

Update

I've tried and it doesn't look like the URI's I provided above work. See https://internal-absorbed-celsius.glitch.me/

Soc
  • 7,425
  • 4
  • 13
  • 30