I am trying to invoke few common UPI Apps (Google Pay
, Phone Pay
, PayTM
) using deep links
.
openPaymentApp = async (payApp) => {
let url = '';
switch(payApp) {
case 'PAYTM' : url = 'paytmmp'; break;
case 'GPAY' : url = 'gpay'; break;
case 'PHONEPE' : url = 'phonepe'; break;
}
url = url + '://upi/pay?pa=7024293076@upi&pn=DK Bose&mc=0000&tr=123456789ABCDEFG&tn=HelloWorld&am=11&cu=INR'
console.log('URL : ',url);
try {
await Linking.openURL(url);
}
catch (err) {
console.error('ERROR : ',err);
}
}
render(){
return (
<View style={{alignItems:"center",justifyContent:"center",flex:1}}>
<Button title='PAYTM' onPress={() => this.openPaymentApp('PAYTM')}/>
<Button title='GPAY' onPress={() => this.openPaymentApp('GPAY')}/>
<Button title='PHONE PE' onPress={() => this.openPaymentApp('PHONEPE')}/>
</View>
);
}
It works fine in iOS, i.e on opening the Deep Links the respective apps open up and the app automatically jumps to the UPI payments page with pre filled fields of VPA, Name, Amount, Note etc.
But on Android i have following problems :
GPay
: App does not open.Paytm
: App opens but does not go to UPI payments pagePhonePe
: App opens but does not go to UPI payments pageWhen I tried using default upi deeplink, on android it gives a popup to select a UPI app. But only Google Pay and iMobile (from ICICI) are listed there, Paytm and Phonepe are not listed in that popup.
upi://pay?pa=7024293076@upi&pn=DK...
Are Deeplinks
for UPI payment Apps different for iOS and Android ?
What else needs to be done to open the App and move to UPI payment page with pre filled fields ?
Working deep links for these android apps are:
Paytm:
paytmmp://pay?pa=your@vpa&pn=YourName&tn=Note&am=1&cu=INR
Phonepe:
phonepe://pay?pa=your@vpa&pn=YourName&tn=Note&am=1&cu=INR
GPay
tez://upi/pay?pa=your@vpa&pn=YourName&tn=Note&am=1&cu=INR
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