Skip to main content

Requesting a Recurring Payment

Before each recurring payment, a pre‑debit notification must be sent to the customer as per Indian regulations. This will be handled by Ebanx automatically based on your recurring payment request.

Important: The subscription payment can only proceed once the pre-debit notification has been successfully sent and a mandatory wait period of at-least 24 hours has been completed

Note

Support for recurring charges on existing enrollments created via the Collect Autopay flow will continue to exist through this flow.

Requirements

  • API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.
  • Familiarity with EBANX Direct - This setup follows the same general structure as other payment methods, with a few unique parameters. See EBANX Direct for more info.

Instructions

To request a recurring payment, follow the steps below.

  1. Request UPI Autopay recurring payment



    Requesting a recurring payment with UPI Autopay is very straightforward. It follows the usual standards of /ws/direct payment requests, with the addition of specific parameters related to the enrollment.

    These parameters link the payment to the corresponding enrollment, ensuring that the recurring payment is properly processed.

    Check the fields below:

    ParameterRequirementsDescription
    integration_keyRequiredYour integration key.
    payment.payment_type_codeRequiredCan be either upi-intent-autopay or upi-qrcode-autopay or upi-collect-autopay.
    Note: Please pass the same value against payment_type_code as used during mandate creation
    payment.nameRequiredCustomer's full name. Minimum 5 characters, alphabets only.
    payment.emailRequiredCustomer's email.
    payment.phone_numberRequiredCustomer's phone. Minimum 8 digits, maximum 10 digits, numbers only.
    payment.countryRequiredSet to in for India.
    payment.merchant_payment_codeRequiredUnique code for the payment.
    payment.currency_codeRequiredSet to INR.
    payment.amount_totalRequiredPayment amount.
    payment.addressRequiredCustomer's address. Minimum 3 characters.
    payment.street_numberOptionalCustomer's street number.
    payment.cityRequiredCustomer's city. Minimum 3 characters, alphabets only.
    payment.stateRequiredCustomer's state. Either use state code or state name. Refer to the state list for reference.
    payment.zipcodeRequiredCustomer's zipcode or pincode. Must be 6 digits, numbers only.
    payment.enrollment.merchant_enrollment_codeRequiredUnique identifier associated with the enrollment.

    Check the example:

    curl -X POST \
    --location 'https://sandbox.ebanx.com/ws/direct' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "payment": {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "country": "IN",
    "phone_number": "5555555555",
    "zipcode": "{{zipcode}}",
    "address": "{{address}}",
    "street_number": "{{street_number}}",
    "street_complement": "{{street_complement}}",
    "city": "{{city}}",
    "state": "{{state}}",
    "payment_type_code": "upi-collect-autopay",
    "merchant_payment_code": "{{merchant_payment_code}}",
    "currency_code": "INR",
    "amount_total": 99.85,
    "enrollment": {
    "merchant_enrollment_code": "{{unique_enrollment_code}}"
    }
    }
    }'

    Important : Please pass us the unique merchant_enrollment_code associated with the enrollment for which the subsequent charge is requested . A successful request will return a JSON response like the one below. The UPI Autopay payment will have a pending (PE) status and will be confirmed later by the customer's bank.

    {
    "payment": {
    "hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
    "country": "IN",
    "merchant_payment_code": "{{merchant_payment_code}}",
    "status": "PE",
    "status_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "open_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "confirm_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "transfer_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "amount_br": "99.85",
    "amount_ext": "99.85",
    "amount_iof": "0.00",
    "currency_rate": "1.0000",
    "currency_ext": "INR",
    "due_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "instalments": "1",
    "payment_type_code": "upi-collect-autopay",
    "customer": {
    "document": "{{tax_id}}",
    "email": "john.doe@example.com",
    "name": "John Doe",
    "birth_date": "{{YYYY-MM-DD}}"
    },
    "transaction_status": {
    "acquirer": "EBANX",
    "code": "OK",
    "description": "Payment successfully paid",
    "description_code": "ACCEPTED"
    }
    },
    "status": "SUCCESS"
    }
    Recurring payment failure

    In case a recurring payment fails, the output action differs depending on the enrollment frequency set

    a. For Periodic Enrollments (e.g., monthly, weekly):

    • Step 1: The merchant must initiate a one-time UPI payment request to recover the failed recurring charge.
    • Step 2: The next scheduled recurring payment can continue as usual under the same enrollment — no need to re-enroll the customer.

    b. For On-Demand Enrollments (ondemand): The merchant must restart the debit cycle:

    • Step 1 : Send a recurring payment request again (ws/direct)
    • Step 2 : Ebanx will send PDN and wait for 24 hours to execute payment
  2. Monitor payment for status changes

    Notifications

    Status

  3. Congratulations!

    You have successfully integrated UPI Autopay Recurring Payment.

    Now, for each new billing cycle, simply repeat these steps!

    For more information, refer to the
    Direct API reference guidechevron_right

Tip

The recurring debit logic has to be maintained on your end, EBANX does not control the frequency of the deductions.

Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: