Skip to main content

Pix Automático Retry Intelligence

Pix Automático Retry Intelligence helps you recover recurring payments that fail because the customer did not have enough balance or reached their Pix Automático daily limit. Instead of retrying on a fixed day, each retry is placed on the date with the best chance of being paid.

Retry Intelligence works in two modes. Guided Retries is enabled by default for Pix Automático. Managed Retries is available on request.

Guided RetriesManaged Retries
Who triggers the retryYou, through /ws/retryEBANX, automatically
What EBANX providesThe recommended date for the next retryThe full retry schedule, executed on your behalf
Integration effortRead one field in /ws/query and schedule your callNone beyond the standard Pix Automático integration
Best forMerchants that want to control when each retry is sentMerchants that want EBANX to run retries, with no retry logic on their side

EBANX recommends Managed Retries: retries go out on the recommended dates with no extra development, and no retry is lost to a late or missed call.

This guide covers the requirements, how each mode works in your integration, the retry status values, and the error returned for Managed Retries payments.

Requirements​

  • The enrollment must have the retry policy set to allow_3R_7D. Payments from enrollments with not_allowed are not retried in any mode.
  • Guided Retries is active by default. To switch to Managed Retries, or to opt out of Retry Intelligence, contact your EBANX account team. If you opt out, retries follow the standard flow described in Recurring Payment Retries, without retry_recommendation.
  • Pix Automático rules still apply: up to three retries within seven days after the due date, at most one per day. Retry Intelligence never goes beyond these limits.

How the mode is applied to a payment​

The mode is set on each payment when its first attempt fails. From then on, that payment keeps the same mode until it is confirmed or canceled, even if your configuration changes in the meantime. A change of mode applies to payments that fail after the change.

Guided Retries​

With Guided Retries you keep the Recurring Payment Retries flow you already use. The difference is that the payment query tells you the recommended date for the next retry.

Step 1. Receive the failure notification and query the payment​

When the first attempt fails, EBANX sends the payment status update notification after 9 PM BRT on the due date. Query the payment with /ws/query using the payment hash.

Shell
curl -X POST \
--location 'https://sandbox.ebanxpay.com/ws/query' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"hash": "59acc5f00945fa382ab051651440826da7701533249b3a475"
}'

While the payment is waiting for a retry and still has retries available, the response includes the retry_recommendation node:

JSON
{
"payment": {
"hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
"country": "br",
"merchant_payment_code": "{{unique_merchant_code}}",
"status": "PE",
"status_date": "{{YYYY-MM-DD HH:mm:ss}}",
"open_date": "{{YYYY-MM-DD HH:mm:ss}}",
"confirm_date": null,
"transfer_date": null,
"amount_br": "99.85",
"amount_ext": "99.85",
"amount_iof": "1",
"currency_rate": "1",
"currency_ext": "BRL",
"due_date": "{{YYYY-MM-DD}}",
"payment_type_code": "pix-automatico",
"pre_approved": false,
"enrollment": {
"status": "accepted",
"merchant_enrollment_code": "{{unique_enrollment_code}}"
},
"subscription": {
"subscription_name": "{{subscription_name}}",
"start_date": "{{YYYY-MM-DD}}",
"expiration_date": "{{YYYY-MM-DD}}",
"frequency": "{{frequency}}",
"retry": "allow_3R_7D",
"fixed_amount": "99.85"
},
"retries": {
"retry_status": "AVAILABLE",
"available_retries": 3,
"payment_attempts": [
{
"attempted_at": "{{YYYY-MM-DD HH:mm:ss}}",
"attempt_response": "INSUFFICIENT_FUNDS_OR_DAILY_LIMIT"
}
]
},
"retry_recommendation": {
"recommended_retry_date": "{{YYYY-MM-DD}}",
"available_retries": 3,
"window_expires": "{{YYYY-MM-DD}}"
}
},
"status": "SUCCESS"
}
FieldDescription
recommended_retry_dateRecommended charge date for the next retry, in YYYY-MM-DD (São Paulo time, UTC-3).
available_retriesNumber of retries still available for this payment.
window_expiresLast possible charge date of the retry window, in YYYY-MM-DD (São Paulo time, UTC-3).

retry_recommendation is returned only by /ws/query, and only while retry_status is AVAILABLE. It is not returned once a retry is scheduled, after the payment is confirmed or canceled, or when no retries are left.

Important

A retry requested through /ws/retry is charged on the next day, in São Paulo time (UTC-3). To have the retry charged on recommended_retry_date, call /ws/retry on the day before it, in São Paulo time (UTC-3). For example, if recommended_retry_date is 2026-10-07, call /ws/retry on 2026-10-06.

Requests after the day before window_expires cannot be charged within the window.

The request and response are the same as in the Recurring Payment Retries guide. After a successful call, retry_status changes to LOCKED until the retry is processed.

Step 3. Repeat after each failed retry​

If the retry is not paid and retries are still available within the window, EBANX notifies you again and retry_status returns to AVAILABLE. Query the payment to get a new recommended_retry_date and repeat Step 2.

If the failed retry was the last one, or the seven-day window ended, the payment is canceled, retry_status changes to ENDED, and no new recommendation is returned.

Managed Retries​

With Managed Retries, EBANX runs the retries for you. When the first attempt fails, EBANX schedules each retry on the recommended date and sends it automatically, within the Pix Automático limits. You do not call /ws/retry.

What changes in your integration​

  • Notifications: you keep receiving the payment status update notifications, including the final confirmation or cancellation.
  • /ws/query: the retries node shows retry_status as MANAGED_RETRIES while EBANX is handling the retries, and ENDED once the payment is confirmed or canceled. retry_recommendation is not returned, because there is no action for you to take.
  • /ws/retry: calls for a payment in Managed Retries are declined with BP-R-112.

Example of a payment handled by Managed Retries:

JSON
{
"payment": {
"hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
"country": "br",
"merchant_payment_code": "{{unique_merchant_code}}",
"status": "PE",
"status_date": "{{YYYY-MM-DD HH:mm:ss}}",
"open_date": "{{YYYY-MM-DD HH:mm:ss}}",
"confirm_date": null,
"transfer_date": null,
"amount_br": "99.85",
"amount_ext": "99.85",
"amount_iof": "1",
"currency_rate": "1",
"currency_ext": "BRL",
"due_date": "{{YYYY-MM-DD}}",
"payment_type_code": "pix-automatico",
"pre_approved": false,
"enrollment": {
"status": "accepted",
"merchant_enrollment_code": "{{unique_enrollment_code}}"
},
"subscription": {
"subscription_name": "{{subscription_name}}",
"start_date": "{{YYYY-MM-DD}}",
"expiration_date": "{{YYYY-MM-DD}}",
"frequency": "{{frequency}}",
"retry": "allow_3R_7D",
"fixed_amount": "99.85"
},
"retries": {
"retry_status": "MANAGED_RETRIES",
"available_retries": 2,
"payment_attempts": [
{
"attempted_at": "{{YYYY-MM-DD HH:mm:ss}}",
"attempt_response": "INSUFFICIENT_FUNDS_OR_DAILY_LIMIT"
},
{
"attempted_at": "{{YYYY-MM-DD HH:mm:ss}}",
"attempt_response": "INSUFFICIENT_FUNDS_OR_DAILY_LIMIT"
}
]
}
},
"status": "SUCCESS"
}

Retry status values​

Retry statusModeMeaning
AVAILABLEGuided Retries and standard flowYou can request a retry. In Guided Retries, retry_recommendation shows the recommended date.
LOCKEDGuided Retries and standard flowA retry is scheduled and not processed yet.
MANAGED_RETRIESManaged RetriesEBANX is handling the retries for this payment.
ENDEDAllThe payment was confirmed or canceled. No more retries.

Errors​

CodeMessageWhen it happens
BP-R-112This payment is not eligible for retry via API. Retries are handled automatically by EBANX./ws/retry was called for a payment in Managed Retries.

The other /ws/retry errors are listed in Error Scenarios.

FAQ​

Do I need to change my enrollment to use Retry Intelligence?

No. Any enrollment with the retry policy allow_3R_7D is covered by Guided Retries by default.

Can I switch from Guided Retries to Managed Retries?

Yes. Contact your EBANX account team. Payments that already failed keep the mode they started with. New failures follow the new mode.

Can I opt out of Retry Intelligence?

Yes. Contact your EBANX account team. Payments that already failed keep the mode they started with. New failures follow the standard retry flow, and /ws/query no longer returns retry_recommendation.

What happens if I ignore the recommended date in Guided Retries?

You can still call /ws/retry on another day, following the standard rules. The last day to call is the day before window_expires, because each retry is charged on the next day. The recommendation is a guide, not a requirement.

Need help?

Help Image