Search code examples
javascriptandroidgoogle-chrome

Android Intent not opeining in Android Chrome recent version 110


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

sample UPI links

<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>

Solution

  • You have made some slight mistakes in this URL, First of all, the & character in this URL should be escaped i.e. &amp; 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&amp;pn=Info Edge India Limited&amp;tr=16796361409&amp;am=1.00&amp;cu=INR">Pay Now !</a>
    

    The more general URL is something like-

    upi://pay?pa=UPI_ID&amp;pn=NAME_OF_MERCHANT&amp;tr=TRANSACTION_ID&amp;am=AMOUNT&amp;cu=INR
    

    Small Note: Adding any spaces in this URL is completely fine :). The spaces are automatically escaped to the %20 ASCII code.