UPI integration using deeplinking in iOS

怎甘沉沦 提交于 2021-01-20 13:54:48

问题


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.


回答1:


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/



来源:https://stackoverflow.com/questions/61207671/upi-integration-using-deeplinking-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!