## Zoho Payments Documentation Index Access the complete documentation index at: https://www.zoho.com/in/payments/llms.txt Use this file to discover all available documentation pages before proceeding. # Creating and Executing Mandates Businesses can use mandates to securely collect recurring payments via UPI from their customers. By creating a payment session for mandate enrollment, you obtain the customer’s consent for future charges. Executing it allows you to collect recurring payments on a scheduled basis. ## Create a Payment Session for Mandate Enrollment Before collecting recurring payments, create a payment session for mandate enrollment that authorises your business to charge the customer according to their agreed schedule and amount. To create a mandate, you’ll have to: * [Create a Payment Session for Mandate Enrollment](#create-mandates) * [Executing Mandates](#execute-mandates) * [Send Mandate Notification](#send-mandate-notification) * [Create Payment Session for Mandate Execution](#create-payment-session) * [Execute the Mandate](#execute-mandate) * [Handle Execution Failures](#handle-failures) 1. Create a customer using the [Create Customer API.](https://www.zoho.com/in/payments/api/v1/mandates/#create-customer "Create Customer") 2. Use the `customer_id` to create a [Mandate Enrollment Payment Session](http://zoho.com/in/payments/developerdocs/web-integration/integrate-widget/#payment-session-creation "Mandate") with the required mandate details. 3. Create a new payment instance using the `zapikey`. 4. Call the `requestPaymentMethod()` function on the instance with the `payment_session_id` to initiate the payment. Once initiated, the widget will open, allowing the customer to set up the UPI mandate. After the autopay is set up, you can [execute the mandates](http://zoho.com/in/payments/developerdocs/mandates/create-execute-mandates/#execute-mandates "Execute Mandates") to notify customers and collect recurring payments. **Note:** A mandate once created cannot be modified. To make any changes, you need to create a new mandate. * * * ## Executing Mandates After you set up a mandate and your customer authorises it, you can execute it to securely collect funds on a scheduled basis. Follow the steps below to execute your mandate and start receiving payments. **Notes:** * Notifications must be sent at least 24 hours before the mandate is executed. * For manual notifications, mandate execution should be initiated 24 hours after the notification is sent. * When a mandate execution is triggered directly, a notification is sent, and the execution is processed automatically after 24 hours. ### Send Mandate Notification Once you obtain the `mandate_id`, you can manually send mandate notifications to your customers by using the [Mandate Notification API.](https://www.zoho.com/in/payments/api/v1/mandates/#notify-for-mandate-execution "Mandate API") Mandate Notification Copy ```javascript { "mandate_id": 300000009876, "amount": 100, "execution_date": "23-07-2025", "description": "Testing Mandate Execution", "invoice_number": "INV12345" } ``` **Insight:** Use the `mandate_notification_id` to retrieve details for a specific mandate notification. Refer to our [API docs](https://www.zoho.com/in/payments/api/v1/mandates/#retrieve-mandate-notification "Retrieve mandates") for more details. ### Create Payment Session for Mandate Execution To execute a mandate, create a payment session and use the `session_id` generated from the [Payment Session API](https://www.zoho.com/in/payments/api/v1/mandates/#create-mandate-execution-session "Mandate Execution") in the mandate execution request. **Notes:** * Payment session created for mandate execution is valid for 3 days. * A maximum of 3 retry attempts are allowed for each payment session, with a minimum interval of one hour between each attempt. Create Payment Session Copy ```javascript { "amount": "100", "currency": "INR", "customer_id": "3000000000927", "type": "mandate_execution", "description": "Payment session for mandate execution", "invoice_number": "INV-12345", "meta_data": [ { "key": "Key1", "value": "Value1" } ] } ``` Once you’ve created a payment session, you can proceed to execute the mandate. ### Execute the Mandate You can use the associated `mandate_id` to execute the mandate and collect recurring payments. If the mandate notification is sent manually, make sure to include the `mandate_notification_id` when executing the mandate. Refer to our [API documentation](https://www.zoho.com/in/payments/api/v1/mandates/#execute-mandate "Execute Mandate") for implementing mandate execution. Mandate Execution Copy ```javascript { "customer_id": 3000000006081, "mandate_id": 3000000006083, "payments_session_id": 3000000006082, "amount": 100, "invoice_number": "INV12345", "mandate_notification_id": 3000000009226, "receipt_email": "xxx@abc.com", "phone": "+91 0000000000", "description": "Testing Mandate Execution", "reference_number": "2123" } ``` Once the mandate is executed, recurring payments will be collected from the customer. Payments are processed through UPI, and both the business and the customer receive confirmation of each transaction. Customers can pause or cancel their mandate at any time using their UPI app. **Insight:** Use the `mandate_id` to retrieve details for a specific mandate. Refer to our [API Docs](https://www.zoho.com/in/payments/api/v1/mandates/#retrieve-mandate "API Docs") for more details. * * * ## Handle Execution Failures If a mandate execution fails, you can retry the payment within the same session. Follow these best practices to handle execution failures effectively: * Retry failed executions using the same Payment Session for up to 3 attempts within 3 days of session creation. * Maintain a minimum interval of 1 hour between each retry attempt. * Create a new Payment Session after 3 failed attempts to continue further retries. * Ensure the mandate notification is sent during execution for manual notification cases, and the same notification ID is reused only for retry attempts within the same session, not across different sessions. * Verify whether the mandate execution payment statuses are accurately recorded in your system.