Requesting a Recurring Payment
Once Pre-Debit Notification is successful, the merchant is ready to charge the customer by sending a payment request to our Direct API.
Note: there is a minimum period of 24 hours between the notification and the payment charge. Also, ensure that the enrollment status is accepted
.
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/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:
Parameter Requirements Description integration_key
Required Your EBANX integration key. operation
Required Must be request
.payment.name
Required Full name of the payer. payment.email
Required Customer email. payment.phone_number
Required Customer contact number. payment.country
Required Two-letter country code. Set to IN
for India.payment.merchant_payment_code
Required Unique code for the payment. payment.currency_code
Required Set to INR
.payment.amount_total
Required Payment amount. payment.address
Required Customer address (Max characters: 100). payment.street_number
Required Customer street/Landmark information (Max characters: 30). payment.city
Required Customer City (Max characters: 80). (Preference: Abbreviation e.g., DL, JK). payment.state
Required Customer state (Characters: 2-80). (Preference: Abbreviation e.g., DL, JK). payment.zipcode
Required Postal code. Must be a 6-digit number (Characters: 6). payment.enrollment.merchant_enrollment_code
Required Unique identifier associated with the enrollment. payment.enrollment.customer_notify_hash
Optional Only mandatory if the merchant decides to handle the notifications on their own. This value is returned in the response to the pre-debit notification. Check the example:
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"operation": "request",
"payment": {
"name": "John Doe",
"email": "email@example.com",
"country": "IN",
"phone_number": "0987654321",
"zipcode": "100200",
"address": "a street",
"street_number": "100",
"street_complement": "Koramangala",
"city": "Bangalore",
"state": "MH",
"payment_type_code": "upi-collect-autopay",
"merchant_payment_code": "{{unique_payment_code}}",
"currency_code": "INR",
"amount_total": 1000,
"enrollment": {
"merchant_enrollment_code": "{{unique_enrollment_code}}",
"customer_notify_hash": "561eb4005d491a7eb009af3f09355969b0f3ed51dda6f3bd99e50c4c41ab799e337a6cb9295cf4028a9ceccdc299850a07ecb123f0fef14bdcc6e7679633956d"
}
}
}'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": "66a22a492540fe35c3d6479aa88551d844ea66de7c193bd1",
"country": "IN",
"merchant_payment_code": "{{unique_payment_code}}",
"status": "PE",
"open_date": "2025-08-02 13:00:00",
"amount_br": "1000.00",
"amount_ext": "1000.00",
"amount_iof": "0.00",
"currency_rate": "1.0000",
"currency_ext": "INR",
"due_date": "2024-07-28",
"instalments": "1",
"payment_type_code": "upi-collect-autopay",
"customer": {
"email": "email@example.com",
"name": "John Doe"
},
},
"status": "SUCCESS"
}note1) Retry Attempts: In case of a payment failure, the system will automatically attempt 3 retries. These retries are managed by EBANX's Partner (not by EBANX or the merchant directly).
2) Recurring payment failure: If 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 new Pre-Debit Notification
- Step 2 : Wait for 24 hours (mandatory wait period)
- Step 3 : Request the recurring payment referring to the same enrollment - need to re-enroll the customer.
3) Billing cycle management: The Merchant defines when to send the Pre-Debit Notification and when the to request the corresponding charge.
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 succesfully 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
Want EBANX to handle the pre-debit notifications?
If you'd like EBANX to manage both the pre-debit notification and the subsequent charge in a single step, you can simply initiate a standard charge request. Our system will automatically handle the notification and proceed with the first debit accordingly—no need to call our APIs twice.
Note: You still must pass unique merchant_enrollment_code
associated with the enrollment for which the charge+notify is requested.
Request example:
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"operation": "request",
"payment": {
"name": "John Doe",
"email": "email@example.com",
"country": "IN",
"phone_number": "8006022015",
"zipcode": "100200",
"address": "a street",
"street_number": "100",
"city": "Bangalore",
"street_complement": "Koramangala"
"state": "MH",
"payment_type_code": "upi-collect-autopay",
"merchant_payment_code": "{{unique_payment_code}}",
"currency_code": "INR",
"amount_total": 1000,
"enrollment": {
"merchant_enrollment_code": "{{unique_enrollment_code}}"
}
}
}'
Afterwards, everything follows the regular payment processing.
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": "66a22a492540fe35c3d6479bb88551d844ea66de7c193bd1",
"country": "IN",
"merchant_payment_code": "{{unique_payment_code}}",
"status": "PE",
"open_date": "2025-08-02 13:00:00",
"amount_br": "1000.00",
"amount_ext": "1000.00",
"amount_iof": "0.00",
"currency_rate": "1.0000",
"currency_ext": "INR",
"due_date": "2024-07-28",
"instalments": "1",
"payment_type_code": "upi-collect-autopay",
"customer": {
"email": "email@example.com",
"name": "John Doe",
},
},
"status": "SUCCESS"
}
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.