I am trying to open to UPI payment link in the chrome browser on mobile devices but it's failing, I cannot figure out the exact reason.
failures observed in
chrome:110, android 12, nokia device
passed in
chrome:110, android 11, one plus device,
safari: 16, ios 16,
firefox
<a target="_self" href="upi://pay?tr=202101345671229366&tid=121313202101345671229366&pa=juspay@axisbank&mc=1234&pn= Merchant%20Inc&am=1.00&cu=INR&tn=Pay%20for%20merchant">Link3</a>
You have made some slight mistakes in this URL,
First of all, the &
character in this URL should be escaped i.e. &
Also, you have to enter the currency as INR i.e. cu=INR
The complete working link can be given as:
<a href="upi://pay?pa=Naukri.payu@indus&pn=Info Edge India Limited&tr=16796361409&am=1.00&cu=INR">Pay Now !</a>
The more general URL is something like-
upi://pay?pa=UPI_ID&pn=NAME_OF_MERCHANT&tr=TRANSACTION_ID&am=AMOUNT&cu=INR
Small Note: Adding any spaces in this URL is completely fine :). The spaces are automatically escaped to the %20
ASCII code.