UPI Intent – Android Mweb
Payment Request API Setup
How to integrate Scapia UPI with Juspay's Mobile Web Payment Page (Mweb PP) using the Payment Request API, enabling Scapia to appear in the top apps list on Android browsers and improving UPI success rates.
Overview
Juspay's Mweb PP uses the Payment Request API to detect which UPI apps are installed on a user's device. Only apps that implement this API correctly are shown in the top apps list — displaying uninstalled apps causes drops in success rates. Google Pay and PhonePe already support this. The steps below configure Scapia to do the same.
Important: All URLs must be chained to each other. The URL used in Step 1 must also be used in Step 5's android:value.
Setup Steps
Complete all 5 steps to enable Scapia in Juspay's Mweb payment sheet.
Return Link response header from the payment method URL
The initial URL https://upi.scapia.in/pay must serve an HTTP response header that points to the payment method manifest JSON.
Link: <https://upi.scapia.in/pay/payment-method-manifest.json>;rel="payment-method-manifest"
This header is already configured in Firebase Hosting via firebase.json for the /pay route.
Serve the payment method manifest JSON
This file lists the web app manifest(s) for Scapia's Android app. It must be accessible at the URL referenced in Step 1's Link header.
{
"default_applications": ["https://upi.scapia.in/pay/manifest.json"]
}
This file is deployed at public/pay/payment-method-manifest.json.
Serve the Android app manifest JSON
This file identifies the Scapia app on the Play Store and provides its SHA-256 certificate fingerprint(s). Replace the placeholder fingerprint with the actual value from your release keystore.
{
"prefer_related_applications": true,
"related_applications": [{
"platform": "play",
"id": "in.scapia",
"min_version": "1",
"fingerprints": [{
"type": "sha256_cert",
"value": "XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX"
}]
}]
}
Action required: Replace the XX:XX:... placeholder with the actual SHA-256 certificate fingerprint of the Scapia release APK. You can obtain it by running:
keytool -list -v -keystore release.keystore
or from the Google Play Console under Setup → App integrity → App signing key certificate.
Add PAY intent-filter to AndroidManifest.xml
Add the following intent-filter to the Activity in the Scapia app that handles incoming UPI payment intents.
<intent-filter> <action android:name="org.chromium.intent.action.PAY" /> </intent-filter>
Add default_payment_method_name meta-data to AndroidManifest.xml
Add the following meta-data tag to the same Activity as Step 4. The android:value must match the payment method URL from Step 1.
<meta-data android:name="org.chromium.default_payment_method_name" android:value="https://upi.scapia.in/pay" />
The android:value here must exactly match the initial URL in Step 1 — https://upi.scapia.in/pay.
Relevant Documentation
Official W3C and web.dev references for the Payment Request API.