UPI subscriptions let you collect recurring payments from customers using UPI subscription mandates.
This guide walks through how to create a UPI subscription using the Intent Flow, where customers approve the mandate by scanning a QR code or using a UPI payment intent.Once the mandate is active, the payment gateway automatically processes recurring debits based on the billing cycle.
Create Subscription
Create a UPI subscription order using Intent Flow
Display QR Code
Show QR code for mandate approval
Invoke UPI Intent
Launch UPI apps on Desktop, Android, and iOS
Prerequisites
Before you begin, ensure you have:- Credentials: Your Client ID and Client Secret
- Domain Whitelist: Whitelisted your website domain for integration
- Webhook URL: A secure endpoint to receive payment status updates
- UPI Subscription enablement: UPI recurring subscription enabled and approved by EximPe.
- Server environment: Ability to make HTTPS
POSTandGETrequests from your backend. - JSON & HTTP Client: Familiarity with JSON request bodies and HTTP client libraries.
Create Subscription
Use the Intent Flow to create subscriptions without requiring the customer’s VPA upfront. The Intent flow allows customers to approve the mandate by scanning a QR code or using a UPI payment intent.Sample Request
Response
The customer approves the mandate by scanning a QR code or using a UPI payment intent. The response returns a QR code in base64 format for display.
Key differences between Card and Intent flow:
- Card Flow: Requires customer’s card details upfront. Payment mandate is created using card information.
- Intent Flow: No VPA required. Customer approves mandate by scanning QR code or using payment intent. Returns QR code in base64 format for display.
Display QR Code
The response includes a base64-encoded QR code that can be displayed directly:intent_uri to generate a QR code client-side or use the provided qr_code.url for UPI app deep linking.
Invoke UPI Intent
The method for invoking the UPI mandate approval depends on the customer’s device and operating system.Mobile (Android & iOS)
Use theintent_uri to directly launch the customer’s UPI application for mandate approval.
1. Specific App Invocation (Android & iOS)
To target a specific app, use the following schemes:| UPI App | Android Package Name (for Intent URL) | iOS URL Scheme Prefix |
|---|---|---|
| Google Pay | com.google.android.apps.nbu.paisa.user | gpay://upi/mandate? |
| PhonePe | com.phonepe.app | phonepe://upi/mandate? |
| BHIM | in.org.npci.upiapp | bhim://upi/mandate? |
| Paytm | net.one97.paytm | paytmmp://upi/mandate? |
| Amazon Pay | in.amazon.mShop.android.shopping | amazonpay://upi/mandate? |
| CRED | com.dreamplug.androidapp | credpay://upi/mandate? |
| Supermoney | money.super.payments | super://mandate? |
| Fi Money | com.fi.money | fi://upi/mandate? |
| Jupiter | money.jupiter | jupiter://upi/mandate? |
| Slice | indwin.c3.shareapp | slice://upi/mandate? |
App Support: Major UPI apps (Google Pay, PhonePe, BHIM, Paytm) support mandate creation via deep links. Some apps may not support the app-specific
/mandate scheme. In such cases, use the generic upi://mandate? scheme or display the QR code returned in the API response as a fallback.2. Generic Intent Invocation
If you want to allow the user to choose from any available UPI app or use their default handler, use the following scheme:| Type | Scheme Prefix | Description |
|---|---|---|
| General UPI | upi://mandate? | Launches the system’s default UPI handler |
- On Android: Invoking
upi://mandate?will open the system’s app tray (the “Complete action using” dialog), allowing the buyer to select from all installed UPI apps. - On iOS: Invoking
upi://mandate?will directly open the default UPI app configured on the device.
Pro Tip: For the best user experience, detect the user’s device type. Show a QR code on Desktop and a list of UPI apps (or an “Approve Mandate” button) on Mobile.