Dunning: retry failed subscription payments
Dunning automatically retries a failed subscription payment. It gives customers another opportunity to pay, for example when a renewal fails because of insufficient funds.
Dunning is configured for a product plan. To enable it, create a preset with a retry schedule and attach it to the product plan.
What happens after a failed payment
| Configuration | Outcome |
|---|---|
| No dunning preset is attached | The subscription moves to CANCELLED. No further payment attempts are scheduled. |
| Dunning is configured and another retry fits within its period | The subscription moves to DUNNING_PERIOD, and a retry is scheduled. |
| No more retries fit within the dunning period | The subscription moves to CANCELLED. Further scheduled charges stop. |
| The payment was refused with a confirmed hard decline | The subscription moves to CANCELLED, with or without dunning. No retry is scheduled. |
Dunning applies to subscription renewal payments, including the first recurring charge after a trial ends.
Hard declines are not retried
Some refusals mean the card can never be charged again, for example because it was reported lost or stolen. Retrying such a card only produces more failed attempts, so dunning does not retry it.
This behavior is being rolled out gradually. Until it is enabled for your environment, hard declines follow the configured retry schedule like any other failure.
When a renewal or a dunning retry is refused with one of the following decline reasons, and that reason can be confirmed, the subscription is cancelled immediately instead of entering or continuing dunning:
| Decline reason | Meaning |
|---|---|
PICKUP_CARD | The issuer asked for the card to be retained. |
LOST_CARD | The card was reported lost. |
STOLEN_CARD | The card was reported stolen. |
FRAUD_DETECTED | The payment was refused as fraudulent. |
INVALID_CARD_NUMBER | The card number does not exist. |
INVALID_ACCOUNT | The card account is closed or invalid. |
NOT_PERMITTED | The issuer does not permit this transaction for the card. |
This happens on the first failed renewal as well as on any retry during the dunning period, even when retries remain. All other decline reasons, such as insufficient funds or a generic decline, follow the configured retry schedule.
In rare cases the decline reason cannot be confirmed when the subscription is updated, for example when the payment provider rejects the request without returning a payment. The failure then follows the configured retry schedule like any other, even though the payment result may report one of the reasons above.
To know what happens to the subscription, use the subscription webhooks rather than the decline reason of the payment:
- Subscription canceled: the subscription was cancelled. A subscription cancelled after a hard decline on its first failed renewal does not send the dunning period webhook.
- Subscription dunning period: the failure is being retried.
When the payment provider returns a decline reason, the payment result of a failed attempt includes it as declineCode. The field is absent when no reason is available.
Enable dunning in the dashboard
- Open Product plans.
- Select the product plan you want to configure.
- Enable the Dunning period section.
- Under Dunning preset, select an existing preset or click Create new dunning.
- Save the product plan.
Creating a preset alone does not enable dunning. You must select and save that preset on the product plan.
You can also manage presets under Preset configurator → Dunning.
Configure the retry schedule
This section describes the standard interval-based schedule without a discount preset.
| Field | Purpose |
|---|---|
| Dunning preset name | Identifies the preset when you select it on a product plan. |
| Duration | The length of the retry period. |
| Charge frequency | The interval between payment attempts. |
The dunning period starts at the scheduled time of the failed payment, rather than the time the failure response is received.
The first retry is scheduled one configured interval after that time. Each subsequent retry is scheduled one interval after the previous scheduled attempt. A retry may be scheduled exactly at the end of the dunning period, but never after it.
If the retry interval is longer than the entire dunning period, no retry fits within the period. The subscription is cancelled after the initial failed payment.
Example: daily retries for seven days
Assume the following configuration:
- Dunning duration: 7 days.
- Retry interval: 1 day.
- Original payment: November 1 at 10:00 UTC.
If every attempt fails:
| Date and time, UTC | Event |
|---|---|
| November 1, 10:00 | The original payment fails, and dunning begins. |
| November 2, 10:00 | First retry. |
| November 3–7, 10:00 | Further daily retries. |
| November 8, 10:00 | Final retry. If it fails, the subscription is cancelled. |
This schedule provides seven retries in addition to the original payment attempt.
If a retry succeeds earlier, the remaining dunning attempts are no longer needed and are not performed.
Scheduled times are target times. Actual execution depends on scheduler processing and may occur later.
What happens after a successful retry
A subscription with auto-renew enabled returns to ACTIVE after successful payment recovery.
The next charge date is determined as follows:
- If the next regular billing date calculated from the original failed due date is still in the future when recovery is processed, that date is kept.
- If that date has already been reached, the next charge is scheduled using the system's recovery interval. The default interval is one day and cannot be configured in the dashboard.
A successful dunning payment therefore does not always start a full new subscription period before the next charge.
If several billing cycles pass during a long dunning period, the missed cycle amounts are not accumulated into a single catch-up charge.
Use the subscription details or the nextPaymentDate in the corresponding webhook to determine the next charge date.
For plans with auto-renew disabled, successful recovery does not enable future renewal. The subscription becomes non-renewing and uses the calculated date as its access cutoff.
When the subscription is cancelled
After a failed attempt, the subscription is cancelled if another retry cannot be scheduled within the dunning period, or if the attempt was refused with a hard decline.
Cancellation can happen before the calendar end of that period. For example, with a seven-day dunning period and a two-day retry interval, retries fall on days two, four, and six. If the attempt on day six fails, the subscription is cancelled because the next attempt on day eight would be outside the period.
Attaching a dunning preset to a product plan does not automatically restore subscriptions that are already CANCELLED.
Dunning and paused subscriptions
Resuming a paused subscription does not enable dunning automatically.
After resumption, the next payment is processed using the product plan's configuration. If that payment fails and no dunning preset is attached, the subscription is cancelled. If dunning is configured and another attempt fits within its period, retries begin.
Before resuming a batch of paused subscriptions, check that the intended dunning preset is attached to their product plans.
Track payment and subscription outcomes
Payment results and subscription state changes are separate events.
| Event | Meaning |
|---|---|
| Recurring payment result | The result of an individual payment attempt. |
| Subscription dunning period | The subscription entered dunning. Includes dunningStartedAt and dunningExpiresAt. |
| Subscription reactivated | The subscription recovered after a successful dunning payment. |
| Subscription canceled | Subscription renewal has stopped. |
Determine the payment outcome from the status field. Under the current webhook contract, an event with type: "PAYMENT_SUCCESS" can contain status: "FAILED".
The webhook delivery status COMPLETED means that the receiving endpoint successfully accepted the request. It does not mean the payment succeeded.
For signature verification and delivery handling, see the Webhooks guide.
Updated about 9 hours ago