Requirements
- API credentials - Make sure you have your EBANX integration key. If not, complete the Merchant Signup Form.
Availability
The following digital wallets are available by country.
Country | Available digital wallets |
---|---|
![]() | Mercado Pago Connect |
![]() | Nupay Mercado Pago Connect |
![]() | Mercado Pago Connect |
![]() | Nequi |
![]() | Mercado Pago Connect |
![]() | Mercado Pago Connect |
Workflow
Recurring payments involve three main steps:
- Customer authorizes payment.
- Payment token is created for future charges.
- Recurring charges are made using the saved token.
Instructions
Follow the steps below.
Customer checkout
Your customer selects a recurring digital wallet payment at checkout.
Customer enrollment
You must enroll your customer in recurring payments by submitting a request to the following endpoint: /ws/userenrollment/{digital_wallet_code}.
Sample request
- Each digital wallet has a unique
code
, which you will need during this process. - In the URL path, replace {digital_wallet_code} with the digital wallet
code
- For the
payment_type_code
parameter, use the digital walletcode
as its value.
// Example using 'mpconnect' digital wallet code.
curl -X POST
--location 'https://api.ebanx.com/ws/userenrollment/mpconnect' \ // Example: mpconnect
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"operation": "enrollment",
"payment_type_code": "mpconnect", // Digital wallet code
"enrollment": {
"merchant_enrollment_code": "f630beb6-8abf-4080-b9ff-a5221131f307", // Unique
"email": "customer.email@example.com",
"country": "br"
}
}'Sample response
{
"status": "SUCCESS",
"redirect_url": "unique_mpconnect_url_to_finish_enrollment",
"enrollment": {
"status": "PENDING",
"merchant_enrollment_code": "f630beb6-8abf-4080-b9ff-a5221131f307", // Unique
}
}- Each digital wallet has a unique
Customer approval
The customer is redirected to the redirect_url, where they approve the recurring payment enrollment.
Create a payment with token
Create a payment using the confiormed
merchant_enrollment_code
curl -X POST
--location 'https://api.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"operation": "request",
"payment": {
"payment_type_code": "mpconnect",
"country": "ar",
"amount_total": "20.00",
"currency_code": "ARS",
"name": "PAYMENT REQUEST CUSTOMER",
"email": "customer.email@example.com"
"merchant_payment_code": "xyz-123-1001",
"metadata": {
"merchant_enrollment_code": "f630beb6-8abf-4080-b9ff-a5221131f307" // Token for recurring payment
},
}
}Handle the payment response
- The response will have a Completed (CO) or Canceled (CA) status.
- There will be no redirection.
{
"payment": {
"hash": "5ec27f3b86fa8e3123452345626aec3989aa2ceccdb7",
"country": "ar",
"merchant_payment_code": "xyz-123-1001",
"order_number": null,
"status": "CO",
"status_date": "2021-12-13 20:23:25",
"open_date": "2021-12-13 20:23:21",
"confirm_date": "2021-12-13 20:23:25",
"transfer_date": null,
"amount_br": "20.00",
"amount_ext": "20.00",
"amount_iof": "0.00",
"currency_rate": "1.0000",
"currency_ext": "ARS",
"due_date": "2021-12-16",
"instalments": "1",
"payment_type_code": "mpconnect",
"pre_approved": false,
"capture_available": null
},
"status": "SUCCESS"
}Congratulations!
You have completed the necessary steps to create a recurring digital wallet payment.
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.