# Automate payment retries

Automatically retry failed subscription and invoice payments to reduce involuntary churn.

Payments can fail for a number of reasons, but many of them are recoverable. Stripe Billing can automatically retry failed subscription and invoice payments for you.

To configure subscription retries in your Dashboard, go to **Billing** > **Revenue recovery** > [Retries](https://dashboard.stripe.com/revenue_recovery/retries). For one-time invoice retries, go to **Advanced invoicing features** under **Settings** > **Billing** > [Invoices](https://dashboard.stripe.com/settings/billing/invoice).

Stripe recommends using Smart Retries, but you can also create a [custom retry schedule](https://docs.stripe.com/billing/revenue-recovery/smart-retries.md#custom-retry-schedule).

> Stripe doesn’t retry payments if:
> 
> - No payment methods are available.
> - The issuer returned a [hard decline code](https://docs.stripe.com/billing/revenue-recovery/smart-retries.md#non-retryable-decline-codes).
> - The payment card is [India-issued](https://docs.stripe.com/india-recurring-payments.md).
> - The Stripe *Connect* (Connect is Stripe's solution for multi-party businesses, such as marketplace or software platforms, to route payments between sellers, customers, and other recipients) account has been disconnected.

## Payment method ordering 

When retrying, Stripe uses the first available payment method in this list, in this order:

| Prioritario | Método de pago | API attribute |
| --- | --- | --- |
| 1 | Subscription default payment method | [subscription.default_payment_method](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-default_payment_method) |
| 2 | Subscription default payment source | [subscription.default_source](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-default_source) |
| 3 | Customer default payment method | - [customer.invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object.md#customer_object-invoice_settings-default_payment_method) (for `Customer` objects)
- [configuration.customer.billing.default_payment_method](https://docs.stripe.com/api/v2/core/accounts/object.md#v2_account_object-configuration-customer-billing-default_payment_method) (for customer-configured `Account` objects) |
| 4 | (Legacy) Fuente de pago predeterminada del cliente | [customer.default_source](https://docs.stripe.com/api/customers/object.md#customer_object-default_source) |

When you update payment methods after a failed payment attempt, update the field where the previous payment failed. For example, if a subscription has a `default_payment_method`, but you only update `customer.invoice_settings.default_payment_method`, Stripe continues to retry on the subscription’s `default_payment_method`.

## Smart Retries

Gracias a la IA, Smart Retries selecciona los mejores horarios para intentos de pagos fallidos y aumentar la probabilidad de cobrar correctamente una factura. El modelo de IA en que se basa Smart Retries utiliza señales dinámicas que dependen de la hora, como:

- La cantidad de dispositivos diferentes que han presentado un determinado método de pago en las últimas *N* horas.
- El mejor horario para hacer pagos (en determinados países, los pagos con tarjeta de débito pueden funcionar un poco mejor si se hacen a las 00:01 según la zona horaria local).

Stripe utiliza esta información para evaluar cuándo reintentar pagos. Aprendemos continuamente de los nuevos comportamientos y transacciones de los compradores, que proporcionan un enfoque más específico sobre la lógica de reintentos de pago establecida en reglas tradicionales. 

Smart Retries reintenta aceptar pagos según tus especificaciones para la cantidad de reintentos y la duración máxima. Puedes establecer la política de Smart Retries para reintentar pagos una cantidad específica de veces dentro de un período de tiempo: 1 semana, 2 semanas, 3 semanas, 1 mes o 2 meses. La configuración predeterminada recomendada es 8 intentos dentro de 2 semanas. También puedes usar [automatizaciones](https://docs.stripe.com/billing/automations.md) con el fin de crear diferentes políticas de reintentos para diferentes segmentos de clientes.

Puedes anular este comportamiento [deshabilitando Smart Retries](https://dashboard.stripe.com/revenue_recovery/retries) y definiendo tus propias reglas de reintento personalizadas. Cuando habilitas la reclamación de pagos, el atributo [next_payment_attempt](https://docs.stripe.com/api/invoices/object.md#invoice_object-next_payment_attempt) indica cuándo se realizará el siguiente intento de cobro.

## Webhook events 

For both Smart Retries and custom retry schedules, Stripe reattempts the charge according to your specified schedule. Use the `invoice.payment_failed` *webhook* (A webhook is a real-time push notification sent to your application as a JSON payload through HTTPS requests) to receive subscription payment failure events and retry attempt updates.

The [attempt_count](https://docs.stripe.com/api/invoices/object.md#invoice_object-attempt_count) attribute on the `invoice.payment_failed` webhook indicates how many attempts have been made so far. If a failure returns a *hard decline code* (A hard decline code means the issuing bank has rejected the transaction and you can't retry it), we can’t retry invoice payment without a new payment method. Retries continue to be scheduled, and [attempt_count](https://docs.stripe.com/api/invoices/object.md#invoice_object-attempt_count) continues to increment, but retries only execute after detecting a new payment method. Unexecuted retries don’t create a new [Charge](https://docs.stripe.com/api/charges.md).

The [next_payment_attempt](https://docs.stripe.com/api/invoices/object.md#invoice_object-next_payment_attempt) attribute on the invoice indicates the date when Stripe will attempt the next collection. For [automations](https://docs.stripe.com/billing/automations.md) users, [next_payment_attempt](https://docs.stripe.com/api/invoices/object.md#invoice_object-next_payment_attempt) is no longer set in `invoice.payment_failed` webhooks but is set in `invoice.updated` webhooks.

### Hard decline codes 

Stripe can’t automatically retry a payment if the card issuer returns any of these hard decline codes:

- `incorrect_number`
- `lost_card`
- `pickup_card`
- `stolen_card`
- `revocation_of_authorization`
- `revocation_of_all_authorizations`
- `authentication_required`
- `highest_risk_level`
- `transaction_not_allowed`

For these failures, the scheduled retries continue but the payment only executes if you obtain a new payment method.

## Custom retry schedule 

You can also modify the retry schedule with [custom rules](https://dashboard.stripe.com/revenue_recovery/retries). You can configure up to three retries, each with a specific number of days after the previous attempt.

You can use the [invoice.payment_failed](https://docs.stripe.com/billing/revenue-recovery/smart-retries.md#invoice-payment-failed-webhook) event to monitor subscription payment failure events and retry attempt updates. After a payment attempt on an invoice, its [next_payment_attempt](https://docs.stripe.com/api.md#invoice_object-next_payment_attempt) value is set using the current subscription settings in your Dashboard.

> When using automations, the [next_payment_attempt](https://docs.stripe.com/api/invoices/object.md#invoice_object-next_payment_attempt) attribute is no longer set in `invoice.payment_failed` webhooks but is set in `invoice.updated` webhooks.

Si falla la recuperación, la suscripción se comportará conforme a tu configuración. Estas son las opciones:

| Configuración | Descripción |
| --- | --- |
| Cancelar la suscripción | The subscription changes to `canceled` after the maximum number of days defined in the retry schedule. |
| Marcar la suscripción como impaga | The subscription changes to `unpaid` after the maximum number of days defined in the retry schedule. Invoices continue to be generated and stay in a draft state. |
| Dejar la suscripción como vencida | The subscription remains `past_due` after the maximum number of days defined in the retry schedule. Invoices continue to be generated and charge the customer based on retry settings. |
| Pause the subscription | If the subscription is eligible, it changes to `paused`. Stripe doesn’t generate new subscription invoices until the subscription resumes. |

You can pause eligible subscriptions after the first renewal payment failure or after retries are exhausted. To learn about eligibility, retry behavior, billing effects, and resumption, see [Pause subscriptions after payment failure](https://docs.stripe.com/billing/revenue-recovery/smart-retries/pause-on-payment-failure.md).

After the final payment attempt, Stripe makes no further payment attempts. Changing your subscription settings only affects future retries.

## Retry local payment methods 

Stripe can automatically retry failed payments made with local payment methods. Use the **Local payment methods** section for [recurring subscription invoices](https://dashboard.stripe.com/revenue_recovery/retries), [one-off invoices](https://dashboard.stripe.com/settings/billing/invoices/general), or both, to turn on retries.

> If you enable local payment method retries, a payment can still fail. Stripe isn’t responsible for any losses if we don’t retry a payment made with a local payment method.

By default, Stripe doesn’t automatically retry failed payments made with local payment methods. To enable automatic retries for local payment methods, use the corresponding settings in the following table:

| Local payment method | Retryable failures | Maximum retries | Maximum retry period | Mandate requirements | [Release phase](https://docs.stripe.com/release-phases.md) |
| --- | --- | --- | --- | --- | --- |
| ACH Direct Debit | Insufficient funds | 2 | 40 days | [ACH Direct Debit mandates](https://docs.stripe.com/payments/ach-direct-debit.md#mandates) | [General availability](https://docs.stripe.com/payments/ach-direct-debit.md#ach-debit-retries) |
| Canadian pre-authorized debit | Insufficient funds | 1 | 30&nbsp;días | [Canadian pre-authorized debit mandates](https://docs.stripe.com/payments/acss-debit.md#mandates) | [General availability](https://docs.stripe.com/payments/acss-debit.md#acss-retries) |
| Débito directo BECS de Australia | Insufficient funds | 4 | 30&nbsp;días | [AU BECS Direct Debit mandates](https://docs.stripe.com/payments/au-becs-debit.md#mandates) | [General availability](https://docs.stripe.com/payments/au-becs-debit.md#au-becs-retries) |
| Débito directo Bacs | Insufficient funds | 2 | 30&nbsp;días | [Bacs Direct Debit mandates](https://docs.stripe.com/payments/bacs-debit.md#mandates) | [General availability](https://docs.stripe.com/payments/bacs-debit.md#bacs-retries) |
| Débito directo BECS de Nueva Zelanda | Insufficient funds | 1 | 30&nbsp;días | [NZ BECS Direct Debit mandates](https://docs.stripe.com/payments/nz-bank-account.md#mandates) | [General availability](https://docs.stripe.com/payments/nz-bank-account.md#nz-becs-retries) |
| Débito directo SEPA | Insufficient funds | 2 | 30&nbsp;días | [SEPA Direct Debit mandates](https://docs.stripe.com/payments/sepa-debit.md) | [General availability](https://docs.stripe.com/payments/sepa-debit.md#sepa-debit-retries) |
