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:
- 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.
- 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.
- Customer receives notification on the Issuing Bank/PSP App to approve the mandate.
- 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).
- Issuing Bank/PSP validates the mandate and sends the response to NPCI.
- NPCI validates the response and shares it with the Sponsor Bank.
- Sponsor Bank provides the response to NDPS.
- NDPS saves and triggers the response to the merchant.
- 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:
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
- It can be ON, Before & After
- ON: Recurrence rule mandates the execution of the mandate on the very same day as specified in Debit day parameter
- Before / After: Recurrence rules create a span of days between which the payee can execute the mandate
- 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.
- 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’.
- 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 Pattern | debitDay | debitRule = ‘ON’ | debitRule = ‘Before’ | debitRule = ‘After’ | autoExecute | blockfund |
|---|---|---|---|---|---|---|
| One Time | NA | NA | NA | NA | N | Y |
| Daily | NA | NA | NA | NA | Y/N | N |
| Weekly | 1-7 | ‘x’ | 1-‘x’ | ‘x’ – 7 | Y/N | N |
| Fortnightly | 1-16 | ‘x’ | 1-‘x’ | ‘x’ – 16* | Y/N | N |
| Monthly | 1-31 | ‘x’ | 1-‘x’ | ‘x’ – 31* | Y/N | N |
| Bimonthly | 1-31 | ‘x’ | 1-‘x’ | ‘x’ – 31* | Y/N | N |
| Quarterly | 1-31 | ‘x’ | 1-‘x’ | ‘x’ – 31* | Y/N | N |
| Half Yearly | 1-31 | ‘x’ | 1-‘x’ | ‘x’ – 31* | Y/N | N |
| Annually | 1-31 | ‘x’ | 1-‘x’ | ‘x’ – 31* | Y/N | N |
| As Presented | NA | NA | NA | NA | N | N |
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).
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.
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.
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.
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.
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.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.
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
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.
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’.
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).
APIs Triggered via Scheduler:
- Notification API
- Execution API
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.
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.
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
Mandate & Notification Report:
- Path: Transactions -> Recurring Mandate -> Report Type Selection -> Product Selection -> Bank Selection -> From Date and To Date Selection => Report Download
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
| API | Dos | Don'ts |
|---|---|---|
| Create Mandate | Maintain 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 Mandate | Executions must adhere to the configuration as per the Create mandate request | - |
| Notification | Notification must be posted two days prior to the scheduled execution | - |
| Update Mandate | Only initiate executions as per the latest mandate configuration | - |
| Revoke Mandate | - | Do not initiate Execute & Notification APIs for a Revoked Mandate |
Status Codes
- Mandate Create/Update/Revoke API
| Code | Message | Description |
|---|---|---|
| 2001 | Initiated | Mandate Initiated Successfully |
| 2002 | Created | Mandate Created Successfully |
| 2003 | Updated | Mandate Updated Successfully |
| 2004 | Revoked | Mandate Revoked Successfully |
| 5000 | Failed | Bank Failure Reason (Default: Payment Failed) |
| 5001 | Cancelled | Mandate Cancelled |
| 5002 | Failed | Invalid Request Data |
| 5003 | Failed | Mandate Not Found |
| 5004 | Failed | Subchannel Not Configured |
| 5005 | Failed | Invalid Merchant |
| 5006 | Failed | Failed To Get Generate Transaction ID |
| 5007 | Failed | Invalid Amount |
| 5008 | Failed | Invalid Product Amount |
| 5009 | Failed | Invalid Auto Execute Parameter Value |
| 5010 | Failed | Invalid Revokable Parameter Value |
| 5011 | Failed | Invalid Block Fund Parameter Value |
| 5012 | Failed | Invalid Retryable Parameter Value |
| 5013 | Failed | Invalid First Debit Parameter Value |
| 5014 | Failed | Invalid Validate Account Parameter Value |
| 5015 | Failed | Invalid Debit Day Value |
| 5016 | Failed | Invalid Validity Start Date Format |
| 5017 | Failed | Invalid Validity End Date Format |
| 5018 | Failed | Invalid CollectByDate Format |
| 5019 | Failed | Invalid Merchant ID |
| 5020 | Failed | Debit Day Out Of Range For Requested Frequency |
| 5021 | Failed | Invalid Debit Day For Requested Debit Rule |
| 5022 | Failed | Invalid Debit Rule |
| 5023 | Failed | Invalid Purpose For Requested Frequency |
| 5024 | Failed | Invalid Revokable For Requested Frequency |
| 5025 | Failed | Invalid Validity Date |
| 5026 | Failed | Invalid Collect By Date |
| 5027 | Failed | Auto-Execution Not Allowed For Requested Amount Limit |
| 5028 | Failed | Fund Block Not Allowed For Requested Frequency |
| 5029 | Failed | First Debit Should Be Allowed For Requested Amount Limit |
| 5030 | Failed | Retryable Not Available for Auto-Execution |
| 5031 | Failed | Invalid Account Details |
| 5032 | Failed | Duplicate Product |
| 5033 | Failed | Invalid Products |
| 5034 | Failed | Multi Prod Transaction Not Allowed |
| 5035 | Failed | Total Of All Product Amount Should Be Equal To Amount |
| 5036 | Failed | BMS Response Not Present |
| 5037 | Failed | Failed response from BMS |
| 5038 | Failed | Failed to Persist Mandate Details |
| 5039 | Failed | Failed to Update Mandate Details |
| 5040 | Failed | Cannot Update As Mandate Is Not Yet Created |
| 5041 | Failed | Cannot Revoke As Mandate Is Not Yet Created |
| 5042 | Failed | Auto-Execute Should Not Be Blank |
| 5043 | Failed | Revokable Should Not Be Blank |
| 5044 | Failed | Block Fund Should Not Be Blank |
| 5045 | Failed | Retryable Should Not Be Blank |
| 5046 | Failed | First Debit Should Not Be Blank |
| 5047 | Failed | Validate Account Should Not Be Blank |
| 5048 | Failed | Invalid Validity End Date |
| 5049 | Failed | Debit Rule Should Not Be Null/Empty |
| 5050 | Failed | First Debit Should Not Be Allowed For Requested Frequency |
| 5051 | Failed | The Requested Frequency Allows For A Maximum Validity Date Range Of 30 Days |
| 5053 | Failed | Multiple Account Details Not Allowed |
| 5054 | Failed | Auto-Execution Not Allowed For Requested Frequency |
| 5055 | Failed | Invalid Mobile Number Format |
| 5056 | Failed | Mandate Creation Not Allowed For Requested AuthMode And BankCode |
| 5057 | Failed | Failed To Fetch MCGS PG Details |
| 5058 | Failed | An Error Occurred During The Generation Of The NPCI Request |
| 5059 | Failed | Merchant ID Does Not Match With The Encrypted Merchant ID |
| 5060 | Failed | Failed To Decrypt The Request |
| 5061 | Failed | Failed Response From MCGS |
| 5062 | Failed | Failed To Validate BankCode |
| 5063 | Failed | Execution Date Not Within Validity Period |
| 5065 | Failed | Bank Detail Not Configured |
| 5066 | Failed | Update Request Invalid - No Values Provided To Update |
| 5067 | Failed | Update Request Invalid - No Update Required |
| 5068 | Failed | Mandate Update Not Permitted |
| 5069 | Failed | Mandate Revoke Not Permitted |
- Mandate Callback API
| Code | Message | Description |
|---|---|---|
| 2000 | Success | Mandate Executed Successfully |
| 2002 | Pending | Mandate Execution Pending |
| 5000 | Failed | Mandate Execution Failed |
| 5001 | Failed | Validation Failed |
| 5002 | Failed | Handler Not Found For This Request |
| 5003 | Failed | Mandate Not Found |
| 5004 | Failed | Mandate Not Created Yet |
| 5005 | Failed | Mandate Not Yet Started |
| 5006 | Failed | Mandate Expired |
| 5007 | Failed | Mandate Execution Not Permitted |
| 5008 | Failed | Mandate Already Executed, Cannot Re-Execute |
| 5009 | Failed | Mandate Execution Max Retry Limit Reached |
| 5010 | Failed | Mandate Re-Execution Not Permitted |
| 5011 | Failed | Invalid Merchant |
| 5012 | Failed | Duplicate Merch Txn ID |
| 5013 | Failed | Duplicate Product |
| 5014 | Failed | Invalid Product |
| 5015 | Failed | Multi Product Not Allowed |
| 5016 | Failed | Amount Should Be Equal To Fixed Limit |
| 5017 | Failed | Amount Should Be Less Than Or Equal To Max Limit |
| 5018 | Failed | Total Of All Product Amount Should Be Equal To Amount |
| 5019 | Failed | Failed To Generate Transaction ID |
| 5020 | Failed | Debit Day Range Error |
| 5021 | Failed | Notification Not Found |
| 5022 | Failed | Execution Not Notified |
| 5023 | Failed | Invalid Execution Date |
| 5024 | Failed | Execution Must Be Done Prior 9 AM On Transaction Day |
| 5024 | Failed | Execution Must Be Done Prior 2 Days Of Transaction Day |
- Mandate Notify API
| Code | Message | Description |
|---|---|---|
| 2000 | Success | Mandate Notified Successfully |
| 5000 | Failed | Mandate Notification Failed |
| 5001 | Failed | Validation Failed |
| 5002 | Failed | Mandate Not Found |
| 5003 | Failed | Mandate Not Created Yet |
| 5004 | Failed | Mandate Not Yet Started |
| 5005 | Failed | Mandate Expired |
| 5006 | Failed | Duplicate Merchant Txn ID |
| 5007 | Failed | UMN Not Linked To The Payer VPA |
| 5008 | Failed | Mandate Already Executed, Cannot Re-Execute |
| 5009 | Failed | Notifications Are Only Allowed Between 96 to 48 Hours Of The Debit Day |
| 5010 | Failed | Notification Max Retry Limit Reached |
| 5011 | Failed | Execution Date Not In Valid Execution Window |
| 5012 | Failed | Execution Date Not In Valid Execution Sequence |
| 5013 | Failed | Invalid Execution Date |
| 5014 | Failed | Debit Day Range Error |
FAQ
- 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.
- How can I execute a mandate?
Select your preferred execution day or opt for ad hoc transactions based on your needs.
- What happens if a transaction fails?
If a transaction fails, you can retry it or initiate individual transaction requests.
- How many bank accounts can be validated for recurring payments?
Support is available for up to five bank accounts for verification of recurring payments.
- Are mandates executed automatically?
Yes, mandates are executed automatically on your behalf for all frequencies except one-time or as presented.
- 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.
- What is the maximum duration for creating a mandate?
You can create a mandate for a maximum duration of 30 years.
- How is customer validation done for single authorization?
A nominal payment of Re. 1/- is used for customer validation, ensuring PIN-less executions.
- Do I need to capture payments manually?
No, all payments are auto-captured, and reports can be tracked from the merchant console.
- 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.
- How can I revoke a mandate?
Mandates can be effortlessly canceled using the API.
- 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.
- What currency is supported for UPI & ENACH payments?
UPI & ENACH payments currently support only INR transactions.