Dunning

Dunning email templates, and the day each one goes out

A dunning email has one job: get a customer who never meant to leave to fix their card before their access stops. Most of them fail at it by sounding like a debt collector or by burying the link. Here are five plain-text templates you can copy, the schedule they run on, the event that triggers each one, and what never goes in them, with the sequence material from chapter 24.

A dunning email is the message a subscription business sends when a recurring payment fails: it tells the customer, gives them a link that fixes it, and, as the sequence goes on, says what happens if nothing changes. Dunning management is the system around those emails: the retries, the schedule, and the point where you pause or cancel. The dunning guide covers the whole system; this page is the emails.

Five emails cover almost every case. Four run on a schedule and one is triggered by the customer's bank.

The schedule, and what triggers each email

The days come from chapter 24's sequence: email, retry, email, retry, final warning, pause, cancel. The triggers are Stripe's, from its subscription webhook docs; other billing systems have an equivalent for each.

DayWhat happensEmailTrigger
1Renewal fails; subscription goes past_due1. Payment failedinvoice.payment_failed with attempt_count of 1, or customer.subscription.updated with the status moving to past_due
AnyThe bank wants the customer to authenticate2. Confirm with your bankinvoice.payment_action_required
3, 9RetriesNoneSmart Retries, or your own schedule
6Still unpaid3. ReminderYour daily job: invoice still open 6 days after the first failure
12Still unpaid4. Final warningYour daily job, at day 12. On Stripe, next_payment_attempt going null on invoice.payment_failed also marks the last attempt
14Pause (72-hour grace in chapter 24's version)5. Pausedcustomer.subscription.updated to paused or unpaid
17Cancel if still unresolved5, cancellation wordingcustomer.subscription.deleted

Two details about Stripe change how you wire this up. First, Smart Retries for new accounts runs up to 8 retries within 2 weeks and picks the times itself (Stripe), so your retries won't land on days 3 and 9. Time the emails from the first failure, not from the retries, and set the retry window to match your pause date. Second, if you use automations, next_payment_attempt isn't set on invoice.payment_failed any more, only on invoice.updated (Stripe).

Stripe's built-in emails, or yours

Stripe can send these for you. With Send emails when card payments fail switched on, it emails the customer after each failed payment, with a link to a Stripe-hosted page where they can update their card and pay what's outstanding. It can also email a hosted confirmation link when a payment needs 3D Secure, and warn customers 1 month before a card on file expires (Stripe).

Pick one sender per message. "After each failed payment", with up to eight retries, is up to eight emails, plus yours if you also send them. If you want the escalating sequence below, switch Stripe's failed payment email off and keep its 3D Secure email (or send your own Email 2 instead). One more catch: the Stripe-hosted link stops working when the subscription becomes canceled, incomplete_expired or unpaid (Stripe), so Email 5 needs a link to your own page.

The templates

Plain text, short, and in the order the customer needs them. Placeholders are in braces. Each one leads with what happened, gives the link on its own line, and says what the customer doesn't need to worry about.

Email 1: the payment failed (day 1)

Sent when the renewal fails, once per invoice. The job of this email is to make the fix one click away, not to alarm anyone.

Subject: We couldn't take your {product} payment

Hi {first_name},

We tried to charge {amount} to your {card_brand} ending {last4} for
{product} on {failed_date}, and it didn't go through. Nothing has
changed on your account.

You can update your card here:
{fix_link}

If the card is fine, there's nothing to do: we'll try it again
over the next few days. If your bank blocked the payment, the number
on the back of the card is the quickest way to clear it.

Thanks,
{sender_name}
{company}

If the decline was a hard one (lost, stolen, closed account), cut the "we'll try it again" paragraph. Retrying that card won't happen, and promising it would is how a customer ends up surprised on day 14.

Email 2: the bank wants the customer to confirm (any day)

Sent when the renewal needs authentication. It's not on the schedule because it can happen on any attempt, and it's the one email where a retry will never help.

Subject: Your bank needs you to confirm a {product} payment

Hi {first_name},

Your bank has asked you to confirm the {amount} payment for {product}.
This is a security check from your bank, not a problem with your
account.

Confirm it here (your bank may ask you to approve it in its app or
enter a code):
{confirm_link}

We'll never ask for your card number or a security code by email or
phone. If anyone does, it isn't us.

Thanks,
{sender_name}
{company}

Email 3: the reminder (day 6)

Sent if the invoice is still open. Same link, and for the first time, what happens if nothing changes.

Subject: Your {product} payment still needs attention

Hi {first_name},

We still haven't been able to collect {amount} for {product}. Your
account is working as normal for now.

If we can't collect it by {access_end_date}, we'll pause your account.
Your data stays put, and you can pick up where you left off.

Update your card here:
{fix_link}

If you'd rather cancel, you can do that from the same page, no
questions asked.

Thanks,
{sender_name}
{company}

Email 4: the final warning (day 12)

Names the date in the subject line, because the subject line is the only part some people read.

Subject: Your {product} account will be paused on {access_end_date}

Hi {first_name},

This is the last reminder about the {amount} payment for {product}.
On {access_end_date} we'll pause your account until the payment is
sorted out.

It takes one step to fix:
{fix_link}

If something's wrong with the charge itself, reply to this email and a
person will look at it.

Thanks,
{sender_name}
{company}

Email 5: access paused or ended (day 14 or 17)

Sent when the subscription leaves past due without paying. It confirms what happened and leaves the door open, without guilt.

Subject: Your {product} account is paused

Hi {first_name},

We couldn't collect {amount} for {product}, so your account is now
paused. Nothing has been deleted.

To pick up where you left off, update your card and we'll reactivate
it straight away:
{fix_link}

We'll keep your data until {retention_date}. After that it's deleted
under our retention policy.

Thanks,
{sender_name}
{company}

For a cancellation, swap "paused" for "cancelled" and say whether coming back means a new subscription. And when a card is fixed at any point, send a one-line receipt that says so. The customer who acted deserves to know it worked, and it stops them fixing it twice.

What never goes in a dunning email

  • The full card number, or a request for one. Brand and last four are enough to identify the card. PCI DSS doesn't forbid email as a channel, but if email is used to send or receive card numbers it must be protected, and your email servers come into PCI scope (PCI SSC FAQ 1310). "Reply with your new card details" turns your support inbox into cardholder data.
  • A payment form. Link to a hosted update page instead. On Stripe that's the customer portal's payment_method_update flow (Stripe) or the invoice's hosted page, which also handles 3D Secure (Stripe). Make the link in the email point at your own domain and create the session when it's clicked, so an old email never carries a stale or reusable session URL.
  • Fake urgency. No countdown timers, no "FINAL NOTICE" on the first email, no threats of collections you won't make. The real date in Email 4 is urgent enough.
  • A hidden way out. Say where to cancel. A customer who wanted to leave and can't will leave through their bank instead, as a dispute.
  • An accusation. "Your card was declined" reads as their fault; "We couldn't take your payment" reads as a system problem, which it usually is.
  • A sales pitch. In the US, an email that only completes a transaction the customer agreed to, or notifies them about their subscription, counts as transactional under CAN-SPAM. Lead with an upgrade offer and the subject line or the opening can make it commercial instead (FTC). Keep promotions out of dunning.

In code: send each reminder once

Emails 1, 2 and 5 hang off webhooks. The reminders don't, because nothing happens on day 6 except the passage of time. A daily job sends them, and a sent log keyed on invoice and template means a job that runs twice, or late, never sends a duplicate.

from datetime import datetime, timedelta, timezone

# Day counted from the first failed attempt on the invoice -> template.
# Emails 1, 2 and 5 are sent from webhooks; this job sends the reminders.
REMINDERS = {6: "reminder", 12: "final_warning"}
PAUSE_AFTER = timedelta(days=14)


def send_due_reminders(open_dunning_invoices, sent_log, send, now=None):
    """Run once a day.

    open_dunning_invoices: your rows for invoices still unpaid, each with
    invoice_id, customer_email, first_failed_at (aware datetime), fix_link.
    sent_log: a set (or table) of (invoice_id, template) already sent.
    send: your mailer, send(to, template, context).
    """
    now = now or datetime.now(timezone.utc)
    for inv in open_dunning_invoices:
        day = (now - inv["first_failed_at"]).days
        due = [t for d, t in sorted(REMINDERS.items()) if day >= d]
        if not due:
            continue
        template = due[-1]  # a late run sends the latest one, not both
        key = (inv["invoice_id"], template)
        if key in sent_log:
            continue
        send(inv["customer_email"], template, {
            "fix_link": inv["fix_link"],
            "access_end_date": (inv["first_failed_at"] + PAUSE_AFTER).date(),
        })
        sent_log.add(key)

Stop the job the moment invoice.paid arrives for that invoice, and send the one-line "fixed" receipt instead. Failed subscription payments has the webhook side: classifying the decline so Email 1 goes out only when it should.

The chapter's cheat sheet, including the schedule these emails run on and why the retry comes before the expired-card email. From chapter 24.

  • Judge churn against a benchmark for your segment and price point, not one universal number. In Recurly's data, median annual involuntary churn falls from 1.30 points for plans priced at $10-$25 a month to 0.18 for plans above $250 a month (Recurly, 2026), so a cheap consumer plan and an enterprise plan shouldn't share a target.
  • For B2B SaaS, the common guideline is to earn back your CAC from subscription revenue in under 12 months.
  • Net revenue retention above 100% means expansion is more than covering churn and contraction.
  • An expired card is the one failure you can see coming: the expiry date is on file. If no automatic update has arrived by the expiry month, ask for the new card before the old one expires, not after it fails.
  • The dunning schedule is Day 1, 3, 6, 9, 12, 14, 17: retries and emails that escalate, then a pause, then cancellation.
  • If your processor runs a card account updater, an expired card often fixes itself within days. Retry before you email.
  • Schedule pauses for the end of the paid period. There's nothing to credit, and the charge on resume is for time the customer is about to use.
  • Rate usage from raw records with idempotency keys, and carry late usage onto the next invoice as its own line.
  • A self-service portal takes plan changes and card updates out of your support queue. Let customers change plans and fix their own billing.
  • Win-back works best soon after the customer leaves, while they still remember why they signed up. Track reactivation by days since cancellation to find your own window.

You can now design a dunning sequence instead of running a schedule, pause a subscription without a surprise invoice, bill usage that arrives late or twice, and read a cohort table for what it hides. Get the state machine right first. Every proration, pause, and retry in this chapter is a transition on it, and a system that can't say what state a subscription is in can't say what to charge for it either.


Next up: payment analytics - dashboards, cohort analysis, A/B tests, and churn models, because the customer who's about to cancel has been showing up in your data for weeks.

The final-attempt trigger behind Email 4, as a Stripe webhook. 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'])

Test the sequence before a customer does

Chapter 9's advice is to run three scenarios on a Stripe test clock before launch: a trial that converts, a renewal that declines and recovers on retry, and one that never recovers. Advance the clock and every failed attempt, webhook and status change fires on schedule, so you can read each email in the order a customer would. Then measure the result the way chapter 7 does: failed-payment value recovered within the retry window, divided by failed-payment value. That's your recovery rate, and it beats any benchmark, because it's yours.

Questions

What is a dunning email?

The message a subscription business sends when a recurring payment fails. It tells the customer, gives them a link that fixes it, and, as the sequence goes on, says what happens if nothing changes.

How many dunning emails should you send?

Five cover almost every case: payment failed on day 1, a reminder on day 6, a final warning on day 12, a paused or cancelled notice at the end, and a confirm-with-your-bank email whenever a payment needs authentication. That follows the sequence in chapter 24 of the Payments Playbook.

What should a failed payment email say?

What happened, the card it happened on (brand and last four only), a link to a hosted page that fixes it, and that nothing has changed on the account yet. Later emails add what happens if nothing changes and the date access ends.

Should a dunning email include a payment form?

No. Link to a hosted update page, such as Stripe's customer portal or hosted invoice page. Never ask for card details by email: if email is used to receive card numbers it must be protected and your email servers come into PCI scope.

Does Stripe send dunning emails automatically?

It can. With failed payment emails switched on, Stripe emails the customer after each failed payment with a link to a Stripe-hosted page. It can also send 3D Secure confirmation links and expiring card warnings 1 month before expiry. Use either Stripe's emails or your own for each message, not both.

What the book adds

What chapter 24 adds

  • Failure categories, and the action each one gets
  • Why the email comes before the first retry
  • Pause, downgrade or cancel on day 14
  • Dunning tuned for high-value accounts
  • Churn prediction and win-back

30-day money-back · Instant PDF and EPUB

All 42 chapters