2

I'm using Ionic for an app and trying to implement UPI with deeplink.

Everything working fine for Android. I'm using Web Intent and I'm getting the response.

Then, I got to know that I can't use Web Intent in iOS.

So I googled it and found few answers which uses In App Browser to open the app. My code looks something like below.

this.iab.create(UPI_DEEPLINK, "_system");

My UPI Deeplink is something like below.

$upi = "upi://pay?pa=myupi@vpa&pn=My+Name&am=80&tr=OrderID123&tn=UPI+Message+Here&cu=INR&mc=UPI_MERCHANT_CODE&mode=05&orgid=000000&url=https%3A%2F%2Fmy-callback-url.com%2Fisupi%3Dtrue%26oid%3D1234"

and then this URL is signed using RSASHA256

openssl_sign($upi, $binary_signature, $private_key, "SHA256");
$sign = base64_encode($binary_signature);

then added to UPI Deeplink as below

$upi .= "&sign=" . $sign;

FYI I'm using PHP backend and adding url part only when the API is called from iOS devices, In Android using Web Intent works as expected. Once the payment is done, I'm redirected back to Merchant App (My App).

By using above deeplink, App opens UPI application and payment also made successfully. but the app wont open the Merchant app/the given URL (I've tried deeplinking my app instead of website URL something like myapp://callback-url, but UPI needs http/https URLs to be passed as url parameter. Documentation HERE)

I want the UPI app to open a URL/myapp with data of UPI payment Success/Failed response to iOS app.

How do I implement that?

And Yes,

  1. I've tried adding URL Schema
  2. I've added Associated Domain
  3. Tried different UPI application
rakcode
  • 2,256
  • 4
  • 19
  • 44

0 Answers0