Skip to main content

Recurring Payments via UPI Autopay

UPI Autopay allows Indian customers to authorize recurring payments directly from their UPI-linked bank account. Recurso integrates with Razorpay to manage the full mandate lifecycle:
  • Create mandates against a customer’s VPA (Virtual Payment Address)
  • Authorize via the customer’s UPI app (Google Pay, PhonePe, BHIM, etc.)
  • Auto-debit on schedule with mandatory pre-debit notifications
  • Revoke mandates when no longer needed
UPI Autopay mandates are governed by NPCI (National Payments Corporation of India) guidelines. Recurso handles pre-debit notifications and frequency rules automatically so you stay compliant.

Mandate Object

Mandate Lifecycle

Create a Mandate

Create a UPI autopay mandate for a customer. Optionally link it to a subscription for automatic recurring billing.

Create Parameters

The max_amount must be greater than zero and represents the ceiling for any single debit. Set this to at least the subscription plan amount plus any applicable taxes. Individual debits that exceed max_amount will fail.

Authorization Flow

After mandate creation, the customer must authorize it through their UPI app. Recurso orchestrates this via Razorpay.
1

Mandate creation

Your application calls POST /v1/mandates. Recurso creates the mandate in created status and registers it with Razorpay.
2

UPI collect request

Razorpay sends a collect request to the customer’s UPI VPA. The customer receives a notification in their UPI app.
3

Customer authorization

The customer opens their UPI app, reviews the mandate details (amount, frequency, merchant), and approves it with their UPI PIN.
4

Mandate activated

Once authorized, the mandate transitions through authorized to active. The razorpay_token_id is populated, and Recurso can now execute debits.
Display clear instructions to the customer after mandate creation: “Please check your UPI app and approve the autopay request from [Your Business Name]. The request will expire in 15 minutes.”

Get a Mandate

List Mandates

Retrieve all mandates for your tenant.

Pre-Debit Notifications

NPCI mandates that customers must be notified at least 24 hours before any auto-debit. Recurso handles this automatically.
If the pre-debit notification fails (e.g., UPI service downtime), the debit will not be attempted. Recurso will retry the notification and reschedule the debit accordingly.

Revoke a Mandate

Permanently cancel a mandate. No further debits will be executed.
Revoking a mandate is irreversible. If the mandate is linked to a subscription, the subscription will need a new payment method to continue billing. Consider pausing the subscription first if the customer intends to set up a new mandate.

Linking Mandates to Subscriptions

When a subscription_id is provided during mandate creation, Recurso automatically uses the mandate to collect recurring payments for that subscription.

How Linked Billing Works

  1. When the subscription’s billing cycle triggers a new invoice, Recurso checks for an active mandate.
  2. A pre-debit notification is sent to the customer 24 hours before the scheduled debit.
  3. On the debit date, the invoice amount is collected from the customer’s bank account via UPI.
  4. The invoice is marked as paid and the mandate’s last_debit_at and next_debit_at are updated.

Frequency Options

Match the mandate frequency to the subscription billing interval. A monthly subscription should use a monthly mandate frequency.

Webhooks

Example Webhook Payload

Best Practices

Set max_amount higher than the current plan price to accommodate tax variations, plan upgrades, or price changes. A good rule is 1.5x the expected debit amount. If the actual debit exceeds max_amount, the payment will fail and require a new mandate.
UPI authorization requests typically expire in 15 minutes. If the customer does not approve in time, the mandate remains in created status. Show a re-initiation option in your UI and listen for the mandate.authorized webhook to update the UI in real time.
Subscribe to mandate.debit.failed events. Common failure reasons include insufficient funds, bank server errors, or customer-initiated blocks. Implement retry logic and notify the customer to ensure their bank account has sufficient balance.
Verify the customer’s VPA is valid and active before creating a mandate. An invalid VPA will cause the authorization request to fail silently. Use Razorpay’s VPA validation API for this check.
Send notifications at each stage: when the mandate is created (with approval instructions), when it is authorized, before each debit (in addition to the NPCI-mandated notification), and if a debit fails. Clear communication reduces mandate revocations and support tickets.
Customers can revoke mandates at any time from their UPI app, bypassing your API. Listen for the mandate.revoked webhook and promptly handle the subscription impact — notify the customer and offer alternative payment methods.

Next steps

Consent tracking

The records behind every mandate

Set up UPI mandates

Configuration walkthrough