Documentation

UPI AutoPay

Introduction

  • UPI Autopay enables merchants to receive recurring payments using NPCI's UPI as the payment method.
  • Using the autopay feature for UPI, your customers can enroll to make automatic payments to the merchants via UPI, by approving the e-mandate with the VPA associated PSP application.
  • This feature allows easy and automated payment recollections for merchants, whereas for customers, it saves them from delayed payments leading to discontinued services or late fees for non-timely payments.
  • With UPI Autopay, merchants can get UPI autopay enabled for their customers to enroll for automated recurring payments. The amount is debited as per the frequency, i.e., the fixed regular interval, in which the recurring payments are pre-configured as per the merchant’s discretion. The customer agrees to the interval, amount, and approves the mandate creation as per the set inputs, by authenticating the mandate request.

Process Flow

Mandate Creation

This is a merchant-initiated call for the creation of a mandate request, leading to mandate registration at NPCI post customer authorization on the VPA-associated PSP app. Below is the process of mandate registration:

  1. Customer initiates the checkout process from the merchant website.
    • Merchant displays UPI Autopay option to the consumer.
    • Consumer selects UPI Autopay option and provides input of the VPA, selects frequency, and adjusts the validity period.
    • Merchant initiates the Create Mandate request API to NDPS.
    • NDPS validates the API request parameters.
  2. Once validation is successfully done, NDPS triggers the request to the Sponsor Bank.
    • Bank validates the request and forwards it to NPCI.
    • NPCI validates the request and forwards it to the Issuing Bank/PSP App of the customer.
  3. Customer receives notification on the Issuing Bank/PSP App to approve the mandate.
  4. Authorization:
    • Customer authorizes the creation of the mandate on the PSP app either directly by pressing ‘Approve’ / ‘Confirm’ (if processed within 5 minutes) or by entering PIN (if debit is being processed post 5 minutes of approval).
  5. Issuing Bank/PSP validates the mandate and sends the response to NPCI.
  6. NPCI validates the response and shares it with the Sponsor Bank.
  7. Sponsor Bank provides the response to NDPS.
  8. NDPS saves and triggers the response to the merchant.
  9. Merchant saves the UMN number against which future executions will be triggered.

Note- All transactions above ₹15,000/- will require the end customer to approve the transaction on the Bank/PSP App for every execution.

Below are the key attributes w.r.t Mandate Creation:

  1. Recurrence Value (debitDay), Pattern (frequency) and Rule (debitRule)

    • Frequency: The following are the frequency of payments that can be configured OT, DL, WK, FT, MT, BM, QT, YR, AS, corresponding to ‘one time’, ‘daily’, ‘weekly’, ‘fortnightly’, ‘monthly’, ‘bimonthly’, ‘quarterly’, ‘yearly’ and ‘as presented’.

    • Debit Rule: Recurrence rule defines when debit can be done

      1. It can be ON, Before & After
      2. ON: Recurrence rule mandates the execution of the mandate on the very same day as specified in Debit day parameter
      3. Before / After: Recurrence rules create a span of days between which the payee can execute the mandate
      4. All recurrence rules are limited to a range of values like 1-7, 1-16 or 1-31, so the debit day parameter can only take one of the values from the range based on the rule used. Example - When the ‘weekly’ rule is used with ‘BEFORE’ and the value is ‘5’, the payee can execute the mandate from 1 to 5 (inclusive) for that week. Similarly, if the rule was ‘AFTER’, then allowed execution days would be 5, 6, and 7.
      5. For recurrence patterns ‘Monthly’, ‘Quarterly’, ‘Half-yearly’, and ‘Annually’, when the rule is ‘BEFORE’ and the value is ‘17’, the allowed execution days are 1 to 17th within ‘that month’.
      6. If the frequency is ‘One time’, ‘Daily’, or ‘As presented’, then before/on/after is not applicable.
    • Debit Day - Refer to the table below for the appropriate inputs depending on the frequency:

Recurrence PatterndebitDaydebitRule = ‘ON’debitRule = ‘Before’debitRule = ‘After’autoExecuteblockfund
One TimeNANANANANY
DailyNANANANAY/NN
Weekly1-7‘x’1-‘x’‘x’ – 7Y/NN
Fortnightly1-16‘x’1-‘x’‘x’ – 16*Y/NN
Monthly1-31‘x’1-‘x’‘x’ – 31*Y/NN
Bimonthly1-31‘x’1-‘x’‘x’ – 31*Y/NN
Quarterly1-31‘x’1-‘x’‘x’ – 31*Y/NN
Half Yearly1-31‘x’1-‘x’‘x’ – 31*Y/NN
Annually1-31‘x’1-‘x’‘x’ – 31*Y/NN
As PresentedNANANANANN

The debit day for all inputs other than ‘OT, DL, and AS’ can be a specific day, or a range of days that can be after/before the specified day (inclusive of) in the range of the selected frequency, as required.

Depends on the number of days in a certain month, i.e., if the value is not available for that month, then the last day for execution becomes the last available value (e.g., 28, 29, 30 or 13, 14, 15).

  1. First Debit

    • For cases where amountLimit = ‘M’ (i.e., maximum), a debit of ₹1 will take place as soon as the end customer approves the Mandate via their PSP application.
    • Whereas, for cases where amountLimit = ‘F’ (i.e., fixed amount), the first execution shall happen either automatically by NDPS (if firstDebit=‘Y’), or the execution will be initiated by the Merchant (if firstDebit= ‘N’).
    • This is a non-refundable amount that will be credited to the first ‘product’ identified in the ‘Create Mandate’ request.

      Note*- First debit is not applicable for ‘OT’ frequency.

  2. Revokable - It gives the payer the authority to revoke the mandate.

    • In recurring mandates, it’s mandatory to give the customer the right to revoke the mandate.
    • In One Time Mandates, the merchant may give the option of revoking the mandate to the payer.
  3. Block Fund - It gives the payee the authority to block the funds.

    • In recurring mandates, the value is “N” since funds are not blocked.
    • In One Time Mandates, the value is “Y” since funds must be blocked.
  4. Amount Rule -

    Amount rule can have either ‘maximum’ or ‘fixed’. Where ‘maximum’ implies that the amount can vary with every execution request.

    • Example: Consider the amount as ₹1200, and the rule value as ‘M’. Then the payee can debit any value up to ₹1200 per debit. But if the value is ‘F’, then the payee can debit only the exact amount, i.e., ₹1200.
  5. Validity

    Merchant must establish and declare the start and end date, denoting the validity of the mandate. It is suggested to keep the ‘validityStartDate’ as the date of creation of the mandate.

    Note : For frequency ‘OT’, the validity range is restricted to 30 days within which execution must be done.

  6. Collect By Date

    In mandate creation, the merchant must declare the ‘collectByDate’, which indicates the date and time by which the end-user will be able to accept the mandate on their PSP application.

  7. UMN

    It’s a unique alphanumeric code that specifies all mandate-related information.

    • UMN format: umn@psp
    • Length of 32 digits should be before @, and the total length of the UMN address can be a maximum of up to 70 digits.
    • Example: 130a977ccabb11e7abc4cec278b6b50a@okicici
    • The end user can view all mandates in the “My Mandates” option of the PSP application.

Mandate Execution

The executions can occur as per one of the below mechanisms

  1. NDPS Scheduled:

    • Auto scheduling the executions can be done by posting ‘Y’ for the ‘autoExecute’ parameter. For the same, executions are handled by NDPS and the merchant will not trigger notifications or executions.
  2. Pre-requisites: The below must be true at the time of mandate creation:

    • Value in the ‘amountLimit’ parameter must be ‘fixed’.
    • Value in the ‘debitRule’ parameter must be other than ‘OT’ or ‘AS’.
    • Value in the ‘retry’ parameter must always be ‘N’.
  3. Process Flow:

    • Merchant initiates mandate creation via ‘Create Mandate API’.
    • Executions are scheduled by NDPS and triggered periodically, depending on the mandate inputs.
    • Merchant may ‘Update’ or ‘Revoke’ the mandate (if required).
  4. APIs Triggered via Scheduler:

    • Notification API
    • Execution API
  5. Merchant Scheduled On posting ‘N’ for the ‘autoExecute’ parameter, the execution will be initiated from the merchant’s end. In this case, notifications and executions are to be handled by the merchant themselves.

Note : It is mandatory for the merchant to maintain the scheduler at their end to trigger the Notification API (2 days prior to the execution) in case of merchant scheduled executions.

  1. Process Flow:

    • Execute Mandate API will be initiated from the merchant to NDPS.
    • NDPS will validate the API request.
    • Post validation, NDPS will trigger the Execution API to the Sponsor Bank.
    • Sponsor Bank will validate the request and provide the response to NDPS post payment authorization.
    • NDPS posts the final response to the merchant.
  2. Points to be Noted:

    • ‘mandateSeqNo’ parameter will always have ‘+1’ (ascending) value for each execution.
    • In case of failed execution, if the Execution API is retriggered for the same transaction, the ‘retryCount’ parameter must be posted having ‘+1’ (ascending) value for every retry (given retry = ‘N’ in Create Mandate request).
    • If any particular mandate execution fails, there are a maximum of 9 re-initiation attempts that can be made before the subsequent execution date. But still, even after the 9 re-attempts if the execution fails or the debit day has passed, then that particular transaction will be skipped in the sequence
    • If the first mandate execution itself is failed/missed, the merchant should not execute subsequent executions and the entire mandate stands cancelled. m - ‘merchTxnId’ must be unique for each and every request (create, update, revoke, execute, and notify).

Notification API

It is mandatory to post notification for the upcoming execution to the customer 2 days prior to every execution. For the same, Notification API must be consumed. Not applicable for Auto Scheduled executions.

  • Merchant needs to inform the payer before executing the mandate except where mandate execution happens within the same day post mandate creation and wherein the merchant will not be able to send notification prior to 48 hours.
  • If the notification doesn’t reach NDPS (e.g., timeout), it’s the liability of the merchant to reinitiate the notification API again until a success response is received.
  • The mandate execution will be denied if the Notification API is not triggered prior to execution.
  • Notification can only be triggered a maximum of 4 days prior to the execution day.

Update Mandate API

Merchant can update an existing Mandate using Update/Revoke Mandate API.

  • Only the ‘Validity End Date’ & the ‘Amount’ of an active Mandate can be modified.
  • Payer will be required to authorize the modified mandate by entering UPI PIN on PSP App approval request for the same.
  • No change in UMN on modification of the mandate.

Refund API

  • Refund option is available on the Merchant Console and will be used to provide refunds.
  • Menu for initiating the refund is Refund → Online Channel Refund.
  • Refund API can also be consumed for the same.

Callback

Web hook to post the details for transactions with updated status for:

  • Mandate Creation
  • Mandate Execution
  • Mandate Revoke/Update

Transaction Status

Merchant can always fetch the status of the below using Transaction Status API:

  • Mandate Creation

  • Execution

  • Notification

  • Revoke / Update

  • Refund

    Note : Status can be fetched using either ‘NDPS Transaction ID’ or ‘Merchant Transaction ID’.Status can be fetched using either ‘NDPS Transaction ID’ or ‘Merchant Transaction ID’.


Reports

  1. Mandate & Notification Report:

    • Path: Transactions -> Recurring Mandate -> Report Type Selection -> Product Selection -> Bank Selection -> From Date and To Date Selection => Report Download
  2. Execution Report:

    • Path: Transactions -> View Transaction -> Product Type selection as ‘UPI Autopay’ -> Search

    Note*- All transactions pertaining to UPI Autopay will thus be fetched in the report.


Do's and Don'ts

APIDosDon'ts
Create MandateMaintain scheduler at your end if autoExecute is ‘N’Never provide value as ‘OT’ in parameter ‘frequency’ if your business does not pertain to 'broking' segment
Execute MandateExecutions must adhere to the configuration as per the Create mandate request-
NotificationNotification must be posted two days prior to the scheduled execution-
Update MandateOnly initiate executions as per the latest mandate configuration-
Revoke Mandate-Do not initiate Execute & Notification APIs for a Revoked Mandate

Status Codes

  1. Mandate Create/Update/Revoke API
CodeMessageDescription
2001InitiatedMandate Initiated Successfully
2002CreatedMandate Created Successfully
2003UpdatedMandate Updated Successfully
2004RevokedMandate Revoked Successfully
5000FailedBank Failure Reason (Default: Payment Failed)
5001CancelledMandate Cancelled
5002FailedInvalid Request Data
5003FailedMandate Not Found
5004FailedSubchannel Not Configured
5005FailedInvalid Merchant
5006FailedFailed To Get Generate Transaction ID
5007FailedInvalid Amount
5008FailedInvalid Product Amount
5009FailedInvalid Auto Execute Parameter Value
5010FailedInvalid Revokable Parameter Value
5011FailedInvalid Block Fund Parameter Value
5012FailedInvalid Retryable Parameter Value
5013FailedInvalid First Debit Parameter Value
5014FailedInvalid Validate Account Parameter Value
5015FailedInvalid Debit Day Value
5016FailedInvalid Validity Start Date Format
5017FailedInvalid Validity End Date Format
5018FailedInvalid CollectByDate Format
5019FailedInvalid Merchant ID
5020FailedDebit Day Out Of Range For Requested Frequency
5021FailedInvalid Debit Day For Requested Debit Rule
5022FailedInvalid Debit Rule
5023FailedInvalid Purpose For Requested Frequency
5024FailedInvalid Revokable For Requested Frequency
5025FailedInvalid Validity Date
5026FailedInvalid Collect By Date
5027FailedAuto-Execution Not Allowed For Requested Amount Limit
5028FailedFund Block Not Allowed For Requested Frequency
5029FailedFirst Debit Should Be Allowed For Requested Amount Limit
5030FailedRetryable Not Available for Auto-Execution
5031FailedInvalid Account Details
5032FailedDuplicate Product
5033FailedInvalid Products
5034FailedMulti Prod Transaction Not Allowed
5035FailedTotal Of All Product Amount Should Be Equal To Amount
5036FailedBMS Response Not Present
5037FailedFailed response from BMS
5038FailedFailed to Persist Mandate Details
5039FailedFailed to Update Mandate Details
5040FailedCannot Update As Mandate Is Not Yet Created
5041FailedCannot Revoke As Mandate Is Not Yet Created
5042FailedAuto-Execute Should Not Be Blank
5043FailedRevokable Should Not Be Blank
5044FailedBlock Fund Should Not Be Blank
5045FailedRetryable Should Not Be Blank
5046FailedFirst Debit Should Not Be Blank
5047FailedValidate Account Should Not Be Blank
5048FailedInvalid Validity End Date
5049FailedDebit Rule Should Not Be Null/Empty
5050FailedFirst Debit Should Not Be Allowed For Requested Frequency
5051FailedThe Requested Frequency Allows For A Maximum Validity Date Range Of 30 Days
5053FailedMultiple Account Details Not Allowed
5054FailedAuto-Execution Not Allowed For Requested Frequency
5055FailedInvalid Mobile Number Format
5056FailedMandate Creation Not Allowed For Requested AuthMode And BankCode
5057FailedFailed To Fetch MCGS PG Details
5058FailedAn Error Occurred During The Generation Of The NPCI Request
5059FailedMerchant ID Does Not Match With The Encrypted Merchant ID
5060FailedFailed To Decrypt The Request
5061FailedFailed Response From MCGS
5062FailedFailed To Validate BankCode
5063FailedExecution Date Not Within Validity Period
5065FailedBank Detail Not Configured
5066FailedUpdate Request Invalid - No Values Provided To Update
5067FailedUpdate Request Invalid - No Update Required
5068FailedMandate Update Not Permitted
5069FailedMandate Revoke Not Permitted
  1. Mandate Callback API
CodeMessageDescription
2000SuccessMandate Executed Successfully
2002PendingMandate Execution Pending
5000FailedMandate Execution Failed
5001FailedValidation Failed
5002FailedHandler Not Found For This Request
5003FailedMandate Not Found
5004FailedMandate Not Created Yet
5005FailedMandate Not Yet Started
5006FailedMandate Expired
5007FailedMandate Execution Not Permitted
5008FailedMandate Already Executed, Cannot Re-Execute
5009FailedMandate Execution Max Retry Limit Reached
5010FailedMandate Re-Execution Not Permitted
5011FailedInvalid Merchant
5012FailedDuplicate Merch Txn ID
5013FailedDuplicate Product
5014FailedInvalid Product
5015FailedMulti Product Not Allowed
5016FailedAmount Should Be Equal To Fixed Limit
5017FailedAmount Should Be Less Than Or Equal To Max Limit
5018FailedTotal Of All Product Amount Should Be Equal To Amount
5019FailedFailed To Generate Transaction ID
5020FailedDebit Day Range Error
5021FailedNotification Not Found
5022FailedExecution Not Notified
5023FailedInvalid Execution Date
5024FailedExecution Must Be Done Prior 9 AM On Transaction Day
5024FailedExecution Must Be Done Prior 2 Days Of Transaction Day
  1. Mandate Notify API
CodeMessageDescription
2000SuccessMandate Notified Successfully
5000FailedMandate Notification Failed
5001FailedValidation Failed
5002FailedMandate Not Found
5003FailedMandate Not Created Yet
5004FailedMandate Not Yet Started
5005FailedMandate Expired
5006FailedDuplicate Merchant Txn ID
5007FailedUMN Not Linked To The Payer VPA
5008FailedMandate Already Executed, Cannot Re-Execute
5009FailedNotifications Are Only Allowed Between 96 to 48 Hours Of The Debit Day
5010FailedNotification Max Retry Limit Reached
5011FailedExecution Date Not In Valid Execution Window
5012FailedExecution Date Not In Valid Execution Sequence
5013FailedInvalid Execution Date
5014FailedDebit Day Range Error

FAQ

  1. What payment frequencies are supported?

Choose from a variety of payment frequencies, including one-time, daily, weekly, fortnightly, monthly, bimonthly, quarterly, yearly, and as presented.

  1. How can I execute a mandate?

Select your preferred execution day or opt for ad hoc transactions based on your needs.

  1. What happens if a transaction fails?

If a transaction fails, you can retry it or initiate individual transaction requests.

  1. How many bank accounts can be validated for recurring payments?

Support is available for up to five bank accounts for verification of recurring payments.

  1. Are mandates executed automatically?

Yes, mandates are executed automatically on your behalf for all frequencies except one-time or as presented.

  1. What is required for Two-Factor Authentication (2FA)?

UPI AutoPay requires a UPI PIN for 2FA, whereas debit card or net banking credentials with OTP are needed for E-NACH.

  1. What is the maximum duration for creating a mandate?

You can create a mandate for a maximum duration of 30 years.

  1. How is customer validation done for single authorization?

A nominal payment of Re. 1/- is used for customer validation, ensuring PIN-less executions.

  1. Do I need to capture payments manually?

No, all payments are auto-captured, and reports can be tracked from the merchant console.

  1. Can I update the mandate validity and amount?

Yes, you can update the mandate validity and amount easily, although customer approval via UPI PIN is required for the changes to take effect.

  1. How can I revoke a mandate?

Mandates can be effortlessly canceled using the API.

  1. Which banks and PSP applications are supported?

We support all banks and PSP applications live for UPI AutoPay & ENACH, ensuring a seamless experience for you.

  1. What currency is supported for UPI & ENACH payments?

UPI & ENACH payments currently support only INR transactions.