Happy Independence Day

Jai Hind!

Skip to content
Engineering 5 min read

Mastering UPI Autopay for Recurring Subscriptions

The technical flow of mandates, pre-debit notifications, and subscription management.

PE

Paisape Engineering

Engineering · 12 August 2026

← Back to all posts
Hero Image

The Evolution of Recurring Payments: Enter UPI Autopay

For years, managing recurring subscriptions in India was a painful endeavor for both businesses and consumers. The legacy eNACH (Electronic National Automated Clearing House) system, while functional, was riddled with friction. Mandate registration took days to approve, required complex integrations with legacy banking portals, and suffered from notoriously high drop-off rates due to cumbersome authentication methods involving debit cards or net banking credentials.

The introduction of UPI Autopay (officially known as UPI Mandates) fundamentally altered this landscape. It brought the instant, mobile-first, and highly secure nature of the Unified Payments Interface (UPI) to recurring payments. Today, businesses can set up daily, weekly, monthly, or yearly subscriptions instantly, with users authenticating the mandate using their familiar 4-digit or 6-digit UPI PIN.

In this detailed engineering blog, the Paisape tech team dissects the core mechanics of UPI Autopay, the strict regulatory guidelines around Pre-Debit Notifications, and the architectural requirements for robust mandate management.

Mechanics of Mandate Creation and Execution

The lifecycle of a UPI Autopay mandate involves several distinct phases: Creation, Pre-Debit Notification, Execution (Debit), and optionally, Modification or Revocation. Understanding the technical flow between the Merchant, the Payment Aggregator (PA), the Acquirer Bank, NPCI, and the Issuer Bank is critical.

1. Mandate Registration (Creation)

The journey begins when a user opts into a subscription. The merchant server initiates a mandate creation request containing vital parameters: amount, frequency (e.g., MONTHLY), startDate, endDate, and a unique mandateName. This request is passed to the Payment Aggregator.

The user's UPI app (like Google Pay, PhonePe, or BHIM) receives an intent notification. The user reviews the terms of the mandate on their app. Crucially, the user authorizes the mandate creation by entering their UPI PIN. This is a massive shift from card-based recurring payments where the initial setup required an OTP and subsequent debits happened silently. Here, the UPI PIN acts as a definitive, non-repudiable electronic signature for the entire lifecycle of the subscription.

Upon successful PIN entry, the issuer bank registers the mandate, and NPCI generates a Unique Mandate Number (UMN). The UMN is the primary key for all future operations related to this subscription. It must be securely stored in your backend database against the user's profile.

2. The Ironclad Rule: Pre-Debit Notification (PN)

Perhaps the most critical engineering challenge in implementing UPI Autopay is adhering to the Reserve Bank of India's (RBI) strict guidelines on Pre-Debit Notifications (PN). To protect consumers from surprise charges, the RBI mandates that a user must be notified well in advance of any recurring debit.

The 24-Hour Requirement: A Pre-Debit Notification must be triggered by the merchant (via the PA/Acquirer) to the issuer bank exactly 24 hours before the actual debit execution. This isn't a casual suggestion; it is a hard, systemic rule enforced by NPCI.

If your backend systems attempt to execute a debit without a successfully registered PN 24 hours prior, the transaction will be universally declined with a specific error code indicating a missing or premature notification. Similarly, if you send the PN and attempt to debit the account 23 hours later, it will fail. You must wait the full 24 hours.

Engineering the PN Scheduler: This requirement necessitates a highly reliable, distributed cron or job scheduling system (like Apache Kafka combined with temporal workflows, or AWS Step Functions). Your system must:

  • Identify all mandates due for debit tomorrow.
  • Fire the PN request via your payment aggregator API.
  • Listen for the PN success webhook. The notification triggers an SMS and an app notification to the user.
  • Schedule the actual debit payload to fire exactly 24 hours plus 1 minute after the PN success timestamp.

Users receive a link in the PN notification that allows them to view, pause, or cancel the upcoming debit directly from their UPI app. This consumer empowerment is a core tenet of the UPI Autopay framework.

3. Mandate Execution (The Debit)

Once the 24-hour cooling-off period concludes, your system triggers the actual recurring debit request using the UMN. Unlike the setup phase, this step is completely frictionless for the user—no OTP, no UPI PIN is required. The issuer bank verifies the UMN, checks the account balance, ensures the PN was sent 24 hours prior, and executes the debit.

Due to the asynchronous nature of banking systems, the debit might not be instantaneous. Your systems must rely on webhooks to update the subscription status to 'Active' for the new billing cycle only after receiving a definitive SUCCESS status from the PA.

Handling Asynchronous Pauses and Revocations

A unique aspect of UPI Autopay is that control is decentralized. A user doesn't need to visit your merchant website to cancel their subscription. They can simply open their PhonePe or GPay app, navigate to their active AutoPay settings, and click 'Pause' or 'Revoke'.

When a user revokes a mandate from their app, NPCI broadcasts a MANDATE_REVOKED status down the chain, eventually hitting your system via a webhook. Your infrastructure must be resilient enough to handle these unexpected callbacks.

Critical considerations for Revocations:

  • Webhook Reliability: Ensure your webhook endpoints are highly available and process payloads idempotently. A missed webhook means your system still thinks the mandate is active.
  • Immediate Database Updates: The moment a revocation webhook is received, the corresponding subscription row in your database must be updated to 'Cancelled'. Failure to do so might result in your system attempting a PN or Debit, which will fail and increase your decline rates. More importantly, you must stop delivering the service or shipping the product to avoid revenue leakage.
  • Graceful Degradation: When a user revokes, consider triggering an automated 'win-back' email or SMS immediately, as the intent to churn is instantly known.

Conclusion

UPI Autopay is a masterclass in balancing user convenience with robust consumer protection. For engineering teams, the shift from eNACH to UPI mandates requires building precise temporal workflows to manage the rigid 24-hour Pre-Debit Notification rule, and highly responsive webhook listeners to manage out-of-band user actions like pauses and revocations. By mastering these mechanics, businesses can dramatically reduce their customer acquisition friction and ensure predictable, recurring revenue streams with virtually zero drop-offs at the payment layer.