UPI payment integration in ios

I am trying to integrate UPI payment in my ios app.
I have seen some apps like, if we will select UPI payment it will display the list of UPI apps that are installed in the device. I need to implement a similar kind of feature in my ios app.

I have tried generating URL as specified in NPCI doc

I tried using UIApplication.shared.open(url, options: [:], completionHandler to open the UPI app. Every time it's opening WhatsApp only.

How can i select my favourite UPI payment app from the list of Installed apps on device for doing UPI payment

Upvotes: 4

Views: 1659

Answers (1)

Sommm
Sommm

Reputation: 531

There is no API provided by iOS which show list of UPI Apps that are installed in device. Instead you can go with URL schemes with popular apps.

URL schemes are used to initiate actions or open specific parts of apps from other applications. Here are the common URL schemes used by popular UPI apps in iOS for intents:

Google Pay URL scheme: com.google.pay

PhonePe URL scheme: phonepe://

Paytm URL scheme: paytm://

BHIM UPI URL scheme: bhim://

Example of using a UPI app URL scheme: To open Google Pay for a payment, you can use the following URL in your iOS app:

[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"com.google.pay://"] options:@{} completionHandler:nil];

Note: These URL schemes might change in future updates of the respective apps. It's always recommended to check the latest documentation or information from the app developers for the most accurate and up-to-date URL schemes.

Upvotes: 0

Related Questions