Dunning is what a subscription business does when a recurring payment fails: retry the charge, email the customer, and pause or cancel the subscription if nothing works. The word comes from the verb dun, to demand payment of a debt. In SaaS and subscription billing it's the main defense against involuntary churn, the customers who leave because a payment failed rather than because they chose to.
That share is bigger than most teams assume. Recurly's churn benchmarks (July 2026 data) put average involuntary churn at 1.25% against 3.60% overall, across industries: about a third of all churn. It also tracks price. Involuntary churn is 1.30% in Recurly's $10-$25 average-revenue-per-customer tier and 0.18% above $250, so cheap plans lose more people to failed cards.
Dunning management comes down to three decisions:
- Retries. When to try the card again, and whether to try at all. The decline reason decides, as the table below shows.
- Dunning emails. What to tell the customer, in what order, with a link that fixes the card in one step.
- The cut-off. When to pause, downgrade or cancel, and then stop.
If you bill on Stripe, Smart Retries handles the timing. Stripe's docs say new accounts get it switched on by default, at up to 8 retries within 2 weeks, and that hard declines such as stolen_card aren't retried until the customer adds a new payment method. What's left for you is the messaging and the pause-or-cancel call.
Dunning is the art of saying "hey, your payment failed" in increasingly urgent ways until someone pays up or gives up. Most of the customers behind a failed payment never meant to leave, so every one you recover is revenue you'd already earned.
Measure your own recovery rate: failed-payment value recovered within the retry window, divided by failed-payment value. Multiply your monthly failed value by any improvement in that rate and you have the case for working on dunning. Treat it as a revenue line, not a chore.

Why Payments Fail
Before you fix failed payments, look at why they fail. Most of it isn't your fault. Insufficient funds (broke until payday) and expired or replaced cards are the usual leaders, followed by generic bank declines, issuer fraud filters and network blips, plus a tail that never gets a satisfying explanation.
The mix differs by market and customer base, so pull your own decline codes before deciding where to spend effort. Insufficient funds responds to retry timing; expired cards respond to card-updater services and update-your-card emails; neither fix helps the other.
The decline reason picks the sequence. From chapter 24.
Failure Categories and Actions
| Failure Type | Suggested Action | Retry Delay |
|---|---|---|
| Insufficient funds | Retry with delay | 72 hours |
| Expired card | Request new method | No retry |
| Card declined | Retry once, then new method | 24 hours |
| Authentication failed | Customer action required | No retry until the customer authenticates |
| Processing error | Immediate retry | 1 hour |
The decline reason picks the sequence. Insufficient funds means the money isn't there yet, so the fix is time: retry after a few days, and aim the retry at when money arrives. A generic decline with no reason attached is a coin flip, so retry once and then ask for another card. Authentication failed means the bank wants the customer present, and no number of unattended retries changes that; the only useful action is a link that brings them back. Processing errors are yours or the processor's, and a retry within the hour usually clears them.
Expired cards are the row where retrying the same card is pure waste, which is why the table says not to. A card-updater service changes that row. Visa and Mastercard both run programs that push a reissued card's new number and expiry date to enrolled merchants. Stripe's documentation says it applies those updates to saved cards automatically, with the widest coverage on US-issued cards. The practical effect is that an expired-card failure often fixes itself within days, with no email and no effort from the customer.
So if your processor does this, don't send "your card has expired" on day one. Wait for the update to land, retry, and involve the customer only if that retry fails too. Emailing someone to replace a card the network already replaced is a good way to look like you don't talk to your own processor. The takeaway below about asking for a new card before the old one expires still stands for the cards the updater can't reach. Chapter 29 puts a number on what account updater and smart retries do to authorization rates.
Why the email comes before the first retry, and what happens on day 14. From the same chapter.
Standard Dunning Sequence
- Day 1: Send payment failed email
- Day 3: First retry attempt
- Day 6: Reminder email
- Day 9: Second retry attempt
- Day 12: Final warning email
- Day 14: Pause subscription (72hr grace)
- Day 17: Cancel if unresolved
Each step is a decision, and the shape isn't arbitrary. The email comes before the first retry on purpose. A customer who fixes the card after that email makes the first retry succeed, and a retry that fails before anyone has been told is a wasted attempt. Retries and messages then alternate, so nobody gets two messages in a row without something having been tried in between. The gaps follow the table above; insufficient funds wants 72 hours, and a payday often falls inside that window.
The messages should escalate in specificity, not in volume. Day 1 says something went wrong and gives a link that fixes it in one step. Day 6 repeats the link and, for the first time, says what happens if nothing changes; Day 12 names the date access ends. None of them should read as an accusation, and Chapter 7 has the wording that tests better. When email isn't landing, add a channel rather than a louder email: SMS for the final warning, and a human for the accounts that matter.
Day 14 is where the design question lives: pause, cancel, or downgrade to a plan the account can stay on (a plan change, not a new state)? Pause preserves the account and the data at the cost of a stopped invoice, and it fits when the failure is probably temporary and the customer is probably coming back. Downgrade to the free tier keeps the account alive indefinitely and makes win-back a single click. Cancel fits when keeping the account costs real money in storage, seats, or compute, and the customer has been silent through the whole sequence. The schedule above pauses first and cancels three days later, which gives a quiet customer one last window without letting paused accounts pile up.
Stopping matters as much as starting. Every retry after the sequence ends has worse odds than the one before it, and every message after the final warning spends goodwill you'll want for the win-back campaign. Stop on schedule, record why, and hand the customer to the win-back flow the takeaways describe.
Complete Implementation: See src/examples/24-advanced-subscription-management/dunning_management.py
The Stripe end of it, from chapter 9.
Dunning Management
Configure retry logic in Stripe Dashboard under Billing > Revenue recovery > Retries. Handle failed payments via webhooks:
if event['type'] == 'invoice.payment_failed':
invoice = event['data']['object']
# next_payment_attempt is None once Stripe has no more retries scheduled.
# With Billing automations it's only set on invoice.updated; check there.
if invoice['next_payment_attempt'] is None:
suspend_customer_access(invoice['customer'])
send_final_payment_warning(invoice['customer'])
Questions
What is dunning?
What a subscription business does when a recurring payment fails: retry the charge, email the customer, and pause or cancel the subscription if nothing works.
What is involuntary churn?
Customers who leave because a payment failed, not because they chose to. Recurly's July 2026 benchmarks put it at 1.25% against 3.60% overall churn across industries, about a third of the total.
What should a dunning email say?
Escalate in specificity, not volume. The first email says something went wrong and gives a link that fixes it in one step. The next repeats the link and says what happens if nothing changes. The last names the date access ends. None of them should read as an accusation.
How long should a dunning sequence run?
The sequence in chapter 24 runs 17 days: emails on days 1, 6 and 12, retries on days 3 and 9, a pause on day 14 with a 72-hour grace, and cancellation on day 17 if nothing is resolved. Stripe's default for new accounts is up to 8 Smart Retries within 2 weeks.
Should I email the customer when their card expires?
Not on day one if your processor runs a card updater. Visa and Mastercard push reissued card details to enrolled merchants, and Stripe applies those updates to saved cards automatically. Wait for the update, retry, and email only if that retry fails too.