0
votes

I am trying to integrate UPI in mobile browser. I need to open app tray in browser from where user can select any app and can do the payment.

UPI

To open App tray, we need to hit a url:

UPILINK = upi://pay?pa=xyz&pn=pqr&tr=abc&am=1000

I am trying two ways to hit above url:

  1. window.open("UPILINK", '_blank');

    This is opening in new window, but pop is blocked warning is shown first.

  2. window.location.href = "UPILINK";

    In this approach, user is returned back to previous page.

Do we have any way to open App tray for api hit?

1

1 Answers

0
votes

Try define a function

redirect() {
    window.location = "upi://pay?pa=xyz&pn=pqr&tr=abc&am=1000";
}

And on a button click event bind this function.

It will open up the Apps tray with all the UPI installed in the corresponding mobile.