UPI subscriptions let you collect recurring payments from customers using subscription mandates.
This guide walks through how to create and manage subscriptions using EximPe Merchant APIs.
Create Subscription
Create a subscription order with subscription mandate
Check Mandate Status
Verify that the UPI mandate is active before proceeding
Trigger Recurring Payment
Send pre-debit notification and trigger recurring payment
Modify or Cancel Mandate
Update mandate amount/end date or cancel the subscription
Prerequisites
Before you begin, ensure you have:- Merchant API credentials:
X-Client-ID,X-Client-Secret, andX-Merchant-IDto call the Merchant APIs. - 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.
Integration Steps
The integration consists of four steps:- Create Subscription
- Check Mandate Status
- Trigger Recurring Payment
- Modify or Cancel Mandate
Step 1: Create Subscription
Use the Create UPI Subscription API to create a subscription order and standing instruction. You can use either Intent Flow (QR code/intent) or Collection Flow (requires VPA).Intent Flow
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 (Intent Flow)
Response (Intent Flow)
Key differences between Collection and Intent flow:
- Collection Flow: Requires customer’s VPA upfront. Payment request is sent directly to the customer’s UPI app.
- 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.
For full request and response schema, see the Create UPI Subscription (Intent Flow) endpoint in API Reference.
Collection Flow
Alternatively, you can use the Collection Flow which requires the customer’s VPA upfront. Payment request is sent directly to the customer’s UPI app. To start with, the request is raised from the Merchant to EximPe with the required transaction mandatory/optional parameters. This needs to be a server-to-server curl call request.Sample Request (Collection Flow)
Response (Collection Flow)
Step 2: Check Mandate Status
After the customer approves the UPI mandate, use the Get Subscription Mandate Status API to verify that it is active.Sample Request
Response
mandate_is_active is true.
Step 3: Trigger Recurring Payment
3.1 Send Pre-Debit Notification
Use the Pre-Debit Notification API to inform the customer about an upcoming debit, in line with UPI subscription compliance. This should be sent at least 48 hours before triggering the actual recurring payment. If the billing cycle is daily, the notification should be sent at least 24 hours before triggering the payment.Sample Request
Response
3.2 Trigger Recurring Payment
On the scheduled billing date, trigger the recurring payment using the Trigger Recurring Payment API.Sample Request
Response
Step 4: Modify or Cancel Mandate
4.1 Modify Mandate
To change the billing amount or end date of an active subscription, use the Modify Subscription Mandate API.Sample Request
Response
At least one of
amount or end_date must be provided to modify the mandate.4.2 Cancel Mandate
To fully stop future debits and revoke the subscription mandate, use the Cancel Subscription Mandate API.Sample Request
Response
CANCELLED on success.
Webhooks
EximPe sends webhook notifications when subscription status changes occur. You can configure webhooks to receive real-time updates about subscription lifecycle events.Subscription Status Webhook
The Subscription Status webhook is triggered when a subscription status changes or subscription information is updated. This allows you to track subscription lifecycle events and update your billing records accordingly. For detailed webhook payload specifications, event types, and implementation details, refer to the Subscription Status Webhook in API Reference.For general webhook setup, security, and verification, see the Webhooks Integration Guide.