Card Recurring
Card recurring payments in India enable merchants to securely process subscription-based transactions using digital authorization and tokenization. This guide will help you integrate and manage recurring payments while ensuring compliance with Reserve Bank of India (RBI) regulations.
How it works
- Customer signs up - The customer enters their card details and agrees to recurring payments via a secure one-time authentication (e.g., OTP).
- Payment setup - EBANX creates a digital agreement (e-mandate) with the customer’s bank, setting the amount and schedule.
- Pre-payment alert - The customer gets a notification (SMS/email) at least 24 hours before each charge, showing the amount and date.
- Automatic charging - EBANX processes the payment on the scheduled date using a secure token instead of card details.
- Confirmation - Both the merchant and customer get notified once the payment is complete.
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.
Instructions
Follow the steps below.
- Select your environment
Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.
https://sandbox.ebanx.com/ws/direct - Request a subscription + first charge
Collect the necessary parameters to configure your request.
Parameter Requirement Description integration_keyRequired Your EBANX integration key payment.payment_type_codeRequired Set to creditcardordebitcardSubscription details
Parameter Requirement Description payment.enrollment.merchant_enrollment_codeRequired Unique identifier associated with the subscription. (Character limit: 254) payment.enrollment.subscription.subscription_nameRequired Descriptor of the service being provided, which will be displayed in the customer's app. No special characters allowed. Maximum characters allowed - 50. payment.enrollment.subscription.expiration_dateRequired Defines when the enrollment is no longer valid and no further payments will be charged payment.enrollment.subscription.frequencyRequired The billing cycle of the enrollment.
Accepted values:
weeklymonthlyyearlyondemandpayment.enrollment.subscription.min_amountRequired Minimum amount (per payment) during the validity of the subscription plan (in INR currency). payment.enrollment.subscription.max_amountRequired Maximum amount (per payment) during the validity of the subscription plan (in INR currency). Charge parameters
Parameter Requirement Description payment.nameRequired Customer's full name
Note: Minimum 5 characters, alphabets onlypayment.emailRequired Customer's email. payment.phone_numberRequired Customer's phone
Note: Minimum 8 digits, maximum 10 digits, numbers onlypayment.addressRequired Customer's address
Note: Minimum 3 characterspayment.street_numberOptional Customer's street number payment.street_complementOptional Complement information payment.cityRequired Customer's city
Note: Minimum 3 characters, alphabets onlypayment.stateRequired Customer's state
Note: Refer this for state list. Either use state code or state namepayment.zipcodeRequired Customer's zipcode or pincode
Note: Must be 6 digits, numbers onlypayment.countryRequired Set to infor Indiapayment.merchant_payment_codeRequired Unique code for the payment payment.currency_codeRequired Set to INRpayment.amount_totalRequired Payment amount (Minimum 1.00 INR) payment.card.threeds_forceRequired set to truepayment.card.card_numberRequired 16 digit card number payment.card.card_nameRequired Card holder's name payment.card.card_due_dateRequired Expiry date of card (in mm/yyyy format) payment.card.card_cvvRequired CVV number of the card Subscription Frequency RulesPre-defined
subscription.frequencyvalues dictate when charges can be executed but do not automate subsequent actions. Pre-debit notifications and charge executions must still be managed. Attempts outside the schedule will be declined, but missed windows do not affect subscription status. Charges can proceed in the next cycle. For more flexibility, useondemandas the frequency.Shared Subscription DetailsThe values in
subscription.subscription_name,subscription.expiration_date, andsubscription.frequencywill be sent to the user via SMS by their issuing bank.Fixed Subscription AmountTo set a fixed amount for a subscription request, send
subscription.min_amountandsubscription.max_amountwith the same value. - Sample request
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"payment": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": "Nirvana society",
"street_number": "2993",
"street_complement": "CJ 5",
"city": "Bangalore",
"state": "Karnataka",
"zipcode": "560087",
"country": "in",
"phone_number": "4111111111",
"payment_type_code": "creditcard",
"amount_total": 1,
"currency_code": "INR",
"merchant_payment_code": "<{merchant_payment_code_here}>",
"card": {
"card_number": "134521******0495",
"card_name": "John Doe",
"card_due_date": "08/2050",
"card_cvv": "***",
"threeds_force": true
},
"enrollment": {
"merchant_enrollment_code": "<{merchant_enrollment_code_here}>",
"back_urls": {
"success": "https://developer.ebanx.com/",
"failure": "https://google.com.br"
},
"subscription": {
"subscription_name": "<{subscription_name_here}>",
"expiration_date": "2034-12-31",
"min_amount": "1",
"max_amount": "1000",
"frequency": "ondemand"
}
}
}
}'Auto-Debit and 2FA RequirementsFor subscriptions with expected charge amounts below INR 15,000, auto-debit can be enabled for subsequent charges. This exempts users from two-factor authentication (2FA) (OTP authentication) for future transactions under INR 15,000. However, charges exceeding INR 15,000 will always require user authentication (2FA) for approval.
- Pre debit notification to user
Before processing a recurring subscription charge, you must send a pre-debit notification to the user. This step informs the customer about the upcoming charge, ensuring transparency and compliance with payment regulations. The notification must be sent at least 24 hours before the charge is executed to prevent declines.
The following parameters are required
Parameter Requirement Description integration_keyRequired Your unique and secret integration key, used to authenticate the request. amountRequired Payment amount merchant_enrollment_codeRequired The unique enrollment code assigned when the subscription was registered. payment_execution_dateRequired The date and time of the recurring charge, in the format yyyy-mm-dd hh:mm:ss(should be at least 24 hours later)Sample request
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/customerenrollment-notify' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"amount": "1000",
"merchant_enrollment_code": "<{merchant_enrollment_code_here}>",
"payment_execution_date": "2024-08-01 12:00:00"
}'A successful request returns a JSON response like this
{
"status": "SUCCESS",
"notification": {
"hash": "ac682d9c3b5a2f90150bjcbabe89b933f954e616fbd19e0dff99339f7586881f4e397ca7dd88baba9715d40f39562e8040c1898a551143574aa0f93fc07a4c6e",
"amount": "1000",
"status": "notified",
"payment_execution_date": "2024-08-01 12:00:00"
}
}ConsiderationsYou must wait at least 24 hours after sending the pre-debit notification before initiating the subscription charge.
- The charge can only proceed after receiving a response with
status: notified. - Attempting a charge without this prior notification—or within a shorter wait period—will result in rejection.
Send the notification well in advance of the payment_execution_date. Verify the response to ensure the notification was successful before scheduling the charge.
- The charge can only proceed after receiving a response with
- Process a subscription payment
The next step after sending a successful pre-debit notification and observing the mandatory 24-hour wait period is to process the subscription payment. This request adheres to the standard format used for /ws/direct charge requests, with the addition of specific parameters that link the charge to the subscription. This ensures proper tracking and compliance with notification requirements.
Parameters
To successfully process a subscription payment, you need to include both basic parameters (common to all /ws/direct requests) and charge-specific parameters (unique to subscription payments). These are outlined below:
Basic Parameters
Parameter Requirement Description integration_keyRequired Your unique and secret integration key, used to authenticate the request. payment.payment_type_codeRequired Set to creditcardordebitcardCharge Parameters
Parameter Requirement Description payment.nameRequired Customer's full name
Note: Minimum 5 characters, alphabets onlypayment.emailRequired Customer's email. payment.phone_numberRequired Customer's phone
Note: Minimum 8 digits, maximum 10 digits, numbers onlypayment.addressRequired Customer's address
Note: Minimum 3 characterspayment.street_numberOptional Street number payment.street_complementOptional Complement information payment.cityRequired Customer's city
Note: Minimum 3 characters, alphabets onlypayment.stateRequired Customer's state
Note: Refer this for state list. Either use state code or state namepayment.zipcodeRequired Customer's zipcode or pincode
Note: Must be 6 digits, numbers onlypayment.countryRequired Set to infor India.payment.merchant_payment_codeRequired Unique code for the payment. payment.currency_codeRequired Set to INRpayment.amount_totalRequired The total amount to be charged in INR payment.enrollment.merchant_enrollment_codeRequired The unique identifier for the subscription payment.enrollment.customer_notify_hashRequired The hash received in the successful pre-debit notification response Sample request
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"payment": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": "Nirvana society",
"street_number": "2993",
"street_complement": "CJ 5",
"city": "Bangalore",
"state": "Karnataka",
"zipcode": "560087",
"country": "in",
"phone_number": "4111111111",
"payment_type_code": "creditcard",
"merchant_payment_code": "<{merchant_payment_code_here}>",
"currency_code": "INR",
"amount_total": 1000,
"enrollment": {
"merchant_enrollment_code": "<{merchant_enrollment_code_here}>",
"customer_notify_hash": "<{notify_hash_received_in_PDN_api_response}>"
}
}
}'Sample response
A successful request returns a JSON response like this:
{
"payment": {
"hash": "<{hash_here}>",
"country": "in",
"merchant_payment_code": "<{merchant_payment_code_here}>",
"status": "PE",
"open_date": "2024-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",
"installments": "1",
"payment_type_code": "creditcard",
"customer": {
"email": "john.doe@example.com",
"name": "John Doe"
}
},
"status": "SUCCESS"
}Upon success, the payment will appear as Pending (PE) in your Merchant Area.
- Using EBANX to manage pre-debit notification and charging
If you prefer not to manage the pre-debit notification and the subsequent charge as two separate API calls, Ebanx offers a convenient option to handle both in a single request. By submitting a charge request with specific subscription parameters, Ebanx will automatically manage the notification and execute the charge after the mandatory 24-hour wait period. This simplifies your integration while ensuring compliance with notification requirements.
Parameters This request uses the standard parameters for a /ws/direct charge request, with the addition of the enrollment object to specify the subscription details. Below are the key parameters to include:
Parameters
Parameter Requirement Description integration_keyRequired Your EBANX integration key. modeRequired Set to fullfor a complete payment requestpayment.nameRequired Customer's full name
Note: Minimum 5 characters, alphabets onlypayment.emailRequired Customer's email. payment.phone_numberRequired Customer's phone
Note: Minimum 8 digits, maximum 10 digits, numbers onlypayment.addressRequired Customer's address
Note: Minimum 3 characterspayment.street_numberOptional Street number payment.street_complementOptional Complement information payment.cityRequired Customer's city
Note: Minimum 3 characters, alphabets onlypayment.stateRequired Customer's state
Note: Refer this for state list. Either use state code or state namepayment.zipcodeRequired Customer's zipcode or pincode
Note: Must be 6 digits, numbers onlypayment.countryRequired Set to infor India.payment.merchant_payment_codeRequired Unique code for the payment. payment.currency_codeRequired Set to INRpayment.amount_totalRequired The total amount to be charged in INR payment.enrollment.merchant_enrollment_codeRequired The unique identifier for the subscription For a complete list of parameters, refer to theDirect API reference guidechevron_rightSample request
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"mode": "full",
"payment": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": "AV MIRACATU",
"street_number": "2993",
"street_complement": "CJ 5",
"city": "Bangalore",
"state": "Karnataka",
"zipcode": "560087",
"country": "in",
"phone_number": "4111111111",
"payment_type_code": "creditcard",
"instalments": "1",
"amount_total": 1,
"currency_code": "INR",
"merchant_payment_code": "<{merchant_payment_code_here}>",
"enrollment": {
"merchant_enrollment_code": "<{merchant_enrollment_code_here}>"
}
}
}'Sample response
A successful request will return a JSON response similar to this:
{
"payment": {
"hash": "{<hash_here>}",
"country": "in",
"merchant_payment_code": "<{merchant_payment_code_here}>",
"order_number": null,
"status": "PE",
"status_date": null,
"open_date": "2025-01-14 17:31:08",
"confirm_date": null,
"transfer_date": null,
"amount_br": "1.00",
"amount_ext": "1.00",
"amount_iof": "0.00",
"currency_rate": "1.0000",
"currency_ext": "INR",
"due_date": "2025-01-17",
"instalments": "1",
"payment_type_code": "creditcard",
"transaction_status": {
"acquirer": "EBANX",
"code": "PENDING_AUTHENTICATION",
"description": "Pending Authentication",
"description_code": "PENDING_AUTHENTICATION"
},
"pre_approved": false,
"capture_available": false,
"requested_currency": "INR",
"threedsecure": {
"has_threeds": false
},
"currency_ext_base": "INR",
"card_issuer_country": "IN",
"payment_execution_date": "2025-01-15 17:36:09"
},
"status": "SUCCESS"
}Considerations
-
You must provide the unique merchant_enrollment_code associated with the subscription to ensure the notification and charge are linked correctly.
-
After submitting the request, the payment will appear as "pending" ("PE") in your Merchant Area for 24 hours. The charge will be executed automatically after this period.
-
You are responsible for managing the recurring debit logic, including the frequency of deductions. EBANX handles only the notification and initial charge for this request.
-
If two-factor authentication (2FA) is required, the customer must complete it. If they fail to do so, the payment will be automatically canceled.
-
- 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). If the customer does not complete the payment, the status will eventually change to cancelled (CA).
-
- Manage Enrollment Status
To effectively manage subscriptions, you need to monitor and respond to changes in enrollment status. EBANX provides two reliable methods to keep you updated:
1. Asynchronous notifications:
EBANX sends real-time updates to your specified endpoint whenever an enrollment status changes (e.g., accepted, paused, or resumed).
Sample notification
operation=enrollment_status_change¬ification_type=update&merchant_enrollment_code=testenrollment001042. Actives status querying:
Retrieve the latest enrollment status on-demand before actions like notifications or transactions. This ensures you’re working with the most current data from EBANX.
Endpoint:
https://api.ebanxpay.com/ws/userenrollments/query
Sample request
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/userenrollments/query' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"operation": "query",
"payment_type_code": "creditcard",
"enrollment": {
"merchant_enrollment_code": "<{merchant_enrollment_code_here}>",
"country": "in"
}
}'Sample response (Accepted)
{
"status": "SUCCESS",
"enrollment": {
"status": "accepted"
}
}Sample response (Paused)
{
"status": "SUCCESS",
"enrollment": {
"status": "paused",
"email": ""
}
}Sample response (Resumed)
{
"status": "SUCCESS",
"enrollment": {
"status": "accepted",
"email": ""
}
}Combine both methods for optimal management—use notifications for instant updates and querying for on-demand checks.
- Cancel a subscription (Revoke enrollment)
Canceling a subscription (revoking an enrollment) is a straightforward process. This action immediately terminates the subscription, preventing further charges or notifications. Use this step when a customer requests to end their subscription or when you need to stop recurring payments for any reason.
Send a Cancellation Request
- Use the
operation: "cancel"parameter to initiate the cancellation. - Include the
merchant_enrollment_codeto specify the subscription to be canceled. - Optionally, include the customer's
emailandcountryfor verification.
Confirm the Response
- A successful cancellation will return a status of
"revoked".
Cancellation is irreversibleCancellation is immediate and irreversible. Ensure you have the correct
merchant_enrollment_codebefore proceeding.Sample request
Use the following JSON structure to send a cancellation request:
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/userenrollment' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"operation": "cancel",
"payment_type_code": "creditcard",
"enrollment": {
"merchant_enrollment_code": "<{merchant_enrollment_code_here}>",
"email": "john.doe@example.com",
"country": "IN"
}
}'Sample response
A successful cancellation will return the following JSON response:
{
"status": "SUCCESS",
"enrollment": {
"status": "revoked"
}
} - Use the
- Congratulations!
You have successfully integrated Card Recurring.
For more information, refer to theDirect API reference guidechevron_right
Resources
Use the following resources when testing in your sandbox environment.
API Reference
Click here to access detailed API documentation to integrate efficiently.
Mock Customer Data
Click here to view mock customer data for testing and validating user flows.
Error Codes
Click here to review common error codes to troubleshoot and resolve issues quickly.
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 sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.