I'm developing an app that accepts Payment using UPI, as per the guidelines provided by the NPCI documentation available at link https://www.npci.org.in/sites/all/themes/npcl/images/PDF/UPI_Linking_Specs_ver_1.5.1.pdf I am able to replicate the Intent base behavior in android as per the documentation of Google Pay available at link https://developers.google.com/pay/india/api/android/in-app-payments but I am not able to achieve the same behavior in iOS using URL schemes if more than one UPI supported apps are installed in iPhone.
e.g. If I am using below code in iPhone if only Google Pay is installed then the below code is working fine
let urlString = "upi://pay?pa=test@dcb&cu=INR&mc=0000&appName=TEST&tn=To&am=1.0&pn=TEST&tr=TEST-1574159602900"
guard let url = URL.init(string: textView.text) else {
return
}
UIApplication.shared.openURL(url)
Anyone can help me to find out the exact URL schemes supported by Google Pay to initiate the payment using URL schemes if more than one Apps are installed that support UPI URL scheme i.e. upi://
Integrate through your Android device Have your Merchant Virtual Payment Address (UPI ID) ready from your bank or payment service provider. Find the Android developer documentation. Complete the Prerequisites. Register with Google Pay & Wallet Console.
As per a recent NPCI mandate for banks, UPI is unavailable for iOS versions <13.4, and iPhone 6/6s. Please upgrade your iOS version or try alternate devices to continue using Google Pay.
Google Pay allows customers to make payments online using the United Payments Interface (UPI) mechanism. For more information, see NPCI UPI Linking Specifications. Note: This documentation is applicable for Android devices with Chrome.
At the moment there is no way to integrate Google Pay in your iOS app. At least for native iOS app i suggest to use Apple Pay Thanks for contributing an answer to Stack Overflow!
Google Pay creates a faster and more secure payment experience for online retailers. Google Pay allows customers to make payments online using the United Payments Interface (UPI) mechanism. For more information, see NPCI UPI Linking Specifications. Note: This documentation is applicable for Android devices with Chrome.
UPI integration is required for accepting payments directly from customers thought their UPI apps like GooglePay, BHIM UPI, PhonePe etc. In this article, we have discussed the various types of UPI integrations [with screenshots of payment flow], suitability for your business and how to integrate UPI on your website or mobile application.
You can use application native web view instead of opening browser(outside of the application) Seel the create payment request using web.
supportedMethods: "https://tez.google.com/pay"
You need to add the prefix for the UPI PSP
in the deeplink
before invoking in case of iOS
.
e.x. tez://upi/pay?pa=exeex.payu@indus&pn=exexe%20E-Retail%20Private%20Limited&tr=11426866303&tid=NYK-176044-6770938&am=7.00&cu=INR&tn=UPI%20Transaction%20for%20NYK-176044-6770938
According to this article there are big differences between Google Pay in India and rest of the world, so if you want to handle requests from India and rest of the world without Google Pay installed (or if there are other problems with opening upi URL scheme) you need to determine from where payment is initiated. For India solution from AtulParmar should work, and for other places try to use guide from article mentioned above. Native web view may, but not necessarily will help. Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With