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
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.
- Request UPI Autopay recurring payment
Requesting a recurring payment with UPI Autopay is very straightforward. It follows the usual standards of
/ws/directpayment 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:
Parameter Requirements Description integration_keyRequired Your integration key. payment.payment_type_codeRequired Can be either upi-intent-autopayorupi-qrcode-autopayorupi-collect-autopay.
Note: Please pass the same value againstpayment_type_codeas used during mandate creationpayment.nameRequired Customer's full name. Minimum 5 characters, alphabets only. payment.emailRequired Customer's email. payment.phone_numberRequired Customer's phone. Minimum 8 digits, maximum 10 digits, numbers only. payment.countryRequired Set to infor India.payment.merchant_payment_codeRequired Unique code for the payment. payment.currency_codeRequired Set to INR.payment.amount_totalRequired Payment amount. payment.addressRequired Customer's address. Minimum 3 characters. payment.street_numberOptional Customer's street number. payment.cityRequired Customer's city. Minimum 3 characters, alphabets only. payment.stateRequired Customer's state. Either use state code or state name. Refer to the state list for reference. payment.zipcodeRequired Customer's zipcode or pincode. Must be 6 digits, numbers only. payment.enrollment.merchant_enrollment_codeRequired Unique 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 failureIn 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
- Monitor payment for status changes
Notifications
-
EBANX will send a notification whenever a payment status changes.
-
Make sure your system is set up to receive notifications from EBANX for any changes in payment status.
Status
-
After receiving a notification that status has changed, retrieve the payment status.
-
When a payment is confirmed, the status will change from pending (PE) to confirmed (CO).
-
- Congratulations!
You have successfully integrated UPI Autopay Recurring Payment.
Now, for each new billing cycle, simply repeat these steps!
For more information, refer to theDirect API reference guidechevron_right
The recurring debit logic has to be maintained on your end, EBANX does not control the frequency of the deductions.
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at integration@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.