2
votes

I am a newbie in programming. I want to create an HTML page which have some buttons to invoke popular UPI payments apps like Google Pay, Paytm, PhonePe, etc. but i dont know how to invoke those application and passing them a url "upi://pay?pa=xyz@paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stu".

like <a href="<protocol to invoke app with the upi url parameter>">Donate/Pay via this Payment App</a>

i can tell you the reference like whatsapp https://api.whatsapp.com/send?phone=<country-code-digit><10-digitmobile-number> start the chat with given phone number in the url after verifying if that number with country code exist in whatsapp user list.

1
From where did you get that example URL (UPI)?Swetank Poddar
i have notices some websites/mobile apps invoke upi payment apps to pay bill or recharge or any UPI payment for eg. My Airtel App can invoke paytm and google pay to add money to airtel payment bank or during payments.Sahyog Vishwakarma
That does not mean they use an URL to invoke UPI. They most probably have a payment portal which they use to initiate the UPI payments. There is no upi protocol.Swetank Poddar
In my vision they are invoking Apps. Web Just make request to UPI apps by asking UPI I'd but Airtel thanks app Just open that Mobile application which we select either Google pay or PaytmSahyog Vishwakarma

1 Answers

6
votes

This Code will open all UPI apps in mobile.

<a href="upi://pay?pa=UPIID@oksbi&amp;pn=FNAME SNAME K&amp;cu=INR" class="upi-pay1">Pay Now !</a>

Also adding spaces in the link won't break the URL

<a href="upi://pay?pa=UPIID@oksbi&amp;pn=JOHN BRITAS AK &amp;cu=INR" class="upi-pay1">Pay Now !</a>