Launch external app using many custom url scheme with parameters

Hello,

I’m running a mobile application with Ionic and Angular. I’m simulating a payment process. I would like that on click on a button, it opens me a specific url using schemes.

I have a file containing many schemes for many payment apps.

    "schemeList": [
      {
        "scheme": "paymentApp1",
         },
      {
        "scheme": "paymentApp2",
         }
       ...
        ]

My url looks like this :

url = 'urlSCHEME://doPay?merchantId=12&amount=150&transactionReference=Invoice%2012246'

The payment App does exist on App Store or Play Store, and it is installed on my device.

What I’ve tried :

  • InAppBrowser
  • AppLauncher
  • AppAvailability (it detects that my app is installed)
  • window.open
  • /EddyVerbruggen/Custom-URL-scheme (Github)

None of theses tries open my payment app.

What I want :

On click on button, check if App is installed :

If not, ask for installation

Else, open App with parameters with this url :

paymentApp://doPay?merchantId=12&amount=150&transactionReference=Invoice%2012246

@Saitama Let’s see if my short understanding reaches:
Are you trying to open an application from another application or from a website?

Now, is the missing in both OS (ios and android) or just one specific?

Yes, I’m trying to open a payment application from my Ionic App. The goal is to open a specific page in this payment App passing payment parameters in the url (amount, transaction ID…)

My tests are only made on Android, I’ll test on iOS but my problem for now is in Android.

This payment app is on Play Store, i could open it using the play store url, but that’s not what I want. My goal is to use the URL schemes like twitter:// or instagram:// …

And have you tried using the DeepLinks with Ionic + Capacitor?

For example, this explanation mentions your desired behavior with Custom Schemes:

2 Likes

Thank you very much for your answer, I didn’t know about this page, and I saw that I was using my schemes not correctly on my file. Now the problem is resolved.
Amazing link !

2 Likes