I have integrated razorpay with flutter and everything is working .But it is not invoking the upi app present in device.how to do that?
Asked
Active
Viewed 3,990 times
1
-
https://pub.dev/packages/upi_pay https://pub.dev/packages/upi_india – nitishk72 Oct 04 '21 at 19:09
1 Answers
4
void _launchURL() async {
String _url='upi://pay?pa=dinesh@dlanzer&pn=Dinesh&am=1&tn=Test Payment&cu=INR';
var result = await launch(_url);
debugPrint(result.toString());
if (result ==true) {
print("Done");
} else if (result ==false){
print("Fail");
}
}
Try this code
I use url_launcher plugin for open UPI apps.
Deeplink url 'upi://pay?pa=dinesh@dlanzer&pn=Dinesh&am=1&tn=Test Payment&cu=INR'
,
upi
show list of UPI apps you have in your mobile.
pay
is redirect to payment page.
pa
you mention upi address here (please make business upi account and mention here).
am
amount enter here.
tn
just pass massage.
cu
mention which currency you want to make payment

dinesh balan
- 318
- 1
- 14
-
1FYI, this url works for android only, for IOS you need to specify the url for the app you want to call. example `phonepe://upi/pay?..........` if you want to open phonepe – N.K. Jan 15 '22 at 11:45
-
It's universal standard deeplink url. You also use this same url to anywhere for IOS, android & web also. But web you need some customization – dinesh balan Jan 16 '22 at 04:31
-
-
@Jagadish I think it is not possible to check if the payment was successful or not. If you want that kind of functionality then you will have to integrate payment gateways. – Israr Nov 14 '22 at 08:50
-
I tried using this in Flutter web. It invokes the GPay app alright but gives an error that says 'Invalid QR code. Oops something went wrong!' Any idea what needs to be done – WeSay Solutions Dec 20 '22 at 12:09
-
-