GuideOctober 30, 2026·10 min read

How to Set Up Pre-Dunning: Card Expiry Emails That Stop Failed Payments (2026 Guide)

Sinh Yang

Sinh Yang

Founder of Revova

A card ending 4242 expiring 11/26, an email sent 30 days before expiry leading to a card-updated checkmark, and a seven-day reminder sent only if the card has not been updated

Pre-dunning means emailing a customer about a card that is about to stop working before the charge fails. To set it up, find the subscriptions whose default card expires this month or next, send each customer a link to update it, and stop as soon as they do. Three routes get you there — Stripe's own toggle, a script of your own, or a tool — and this guide walks through all three, step by step.

An expiring card is the most predictable cause of a failed payment there is. The expiry date is printed on the card and stored on the payment method, so unlike an insufficient_funds decline you can see this one coming weeks ahead. That is why the prevention half of recovery is the cheapest half: one email can save an invoice that would otherwise need a retry schedule and a four-email sequence. If the card has already failed, jump to our failed-payment recovery guide; if you want the concept first, read what dunning is.

Key takeaways

  • Cards are valid through the last day of the expiry month, so the date to work back from is the end of that month.
  • Stripe can email customers one month before expiry with a single dashboard toggle; the timing and copy are not configurable.
  • A two-touch window (about 30 days and 7 days out) beats one email, as long as the second touch skips anyone who already updated.
  • Measure two numbers: customers emailed, and customers who updated before expiry.
1 month
How far ahead Stripe's built-in expiring-card email goes out
3
Ways to run pre-dunning: Stripe toggle, your own script, or a tool
2
Touches we recommend: about 30 days and about 7 days before expiry

Step 1: Decide how far ahead to email

Email about 30 days before the end of the expiry month, with a short reminder about a week before it for anyone who has not updated. A card works through the last day of the month printed on it, so a customer whose card says 11/26 is fine for a 30 November charge and declined on 1 December. Working back from the end of the month, not the start, is the most common thing people get wrong.

T–60Too earlyOften ignoredT–30Touch 1Stripe’s built-in emailT–7Touch 2Only if not updatedExpiryLast day of the monthCard still worksNext dayCharge declinesDunning takes overT = last day of the month printed on the card
A suggested two-touch window. Only the 30-day timing is Stripe's documented default; the rest is our recommendation.

Why two touches rather than one? The first email catches the customer who reads it. The second catches the one who read it, meant to do it and forgot. Stripe documents the single one-month email; the second touch is our recommendation from how dunning sequences work, not a Stripe feature. Silent network refreshes can also update some cards before you email anyone — see Account Updater explained — which is why the later touch is the one that matters most.

A fan of Visa and Mastercard payment cards lying on a dark table
Every card prints its expiry as MM/YY and works through the last day of that month. Photo: Yuri Samoilov, CC BY 2.0, via Wikimedia Commons.

Step 2: Pick how you will run it

There are three realistic routes, and the right one depends on how much control and maintenance you want. Start with the table, then read the route you are leaning towards.

Stripe built-inYour own scriptA tool (Revova)
Setup timeMinutes: one toggleA day or twoMinutes: one toggle in Settings
TimingFixed: 1 month before expiryAnything you codeDaily check; cards expiring this or next month
Email copyStripe template with your brandingAnything you writeAI-written, with an optional custom note from you
Second reminderNoIf you build itOne email per customer per month
UpkeepNoneYou own itNone
ProcessorsStripeWhichever you code forStripe (pre-dunning needs Stripe)

Route A: Stripe's built-in expiring-card email

In the Stripe Dashboard, open the email notification settings and turn on Send emails about expiring cards. Stripe emails the customer one month before the card on file expires — their default payment method or default source — with a link to update it, which can be the Stripe-hosted Customer Portal or your own page. It uses your branding settings. It is the right first move for almost everyone: it costs nothing and takes a minute. Its limits are that the timing is fixed and there is one email, not two. For where it sits among Stripe's other recovery features, see Stripe built-in recovery versus a dedicated tool.

Route B: Your own script

If you want the second reminder or your own copy, a small job that runs daily is enough. List active and trialing subscriptions, expand the default payment method, and compare the card's expiry month and year with today. A minimal version looks like this:

import Stripe from 'stripe'

// Use a restricted, read-only key on the server — never in the browser.
const stripe = new Stripe(process.env.STRIPE_RESTRICTED_KEY!)

const now = new Date()
const index = (month: number, year: number) => year * 12 + (month - 1)
const thisMonth = index(now.getMonth() + 1, now.getFullYear())

for (const status of ['active', 'trialing'] as const) {
  for await (const sub of stripe.subscriptions.list({
    status,
    limit: 100,
    expand: ['data.default_payment_method', 'data.customer'],
  })) {
    const card = (sub.default_payment_method as Stripe.PaymentMethod | null)?.card
    if (!card) continue // card saved only on the customer: look there next

    const monthsLeft = index(card.exp_month, card.exp_year) - thisMonth
    if (monthsLeft > 1) continue // 0 = expires this month, 1 = next month

    // queue one email per customer per month, then stop once the card changes
  }
}
A starting point, not production code: add de-duplication, error handling and an unsubscribe path.

Three details trip people up. First, the default payment method can live on the subscription or on the customer, and Stripe resolves them in a defined order, so read both. Second, trialing subscriptions with a card on file are worth including, because the first real charge arrives later. Third, run it on a restricted, read-only key on your server; a secret key in client code is a security incident waiting to happen.

Route C: A tool

Revova's pre-dunning is a switch under Settings. Once on, on Stripe, a daily job looks at your active subscriptions, finds the ones whose default card expires this month or next, and sends an AI-written email with a secure link to update the card. It sends at most one pre-dunning email per customer per month, skips customers with no email address or on your blocklist, and lists the cards it found in a Customers In Danger panel on the dashboard so you can see the exposure.

A limit worth knowing about

Revova reads the default payment method set on the subscription. A card saved only as the customer's default, with nothing set on the subscription, is skipped. If a lot of your customers are set up that way, Stripe's own email (which looks at the default payment method or default source) or a script that checks both will catch more of them.
Pre-dunning is included in both plans, on Stripe: Starter $29/mo, Pro $79/mo, with a 14-day free trial and no card required.
$29–79/mo · free trialStart free →

Step 3: Write an email that gets the card updated

The best pre-dunning email is short, names the card, and has one button. It should say which card (last four digits and expiry), what happens if nothing changes, and give a link that opens the update page directly — no login maze. The difference is easy to see side by side.

Weak
Subject line
Important notice about your account

Dear customer,

Your payment method may expire soon. Please log in and update your billing information to avoid any interruption to your service.

[Update]

Why it works: Vague subject, no card details, a threat instead of a reason, and a button that says nothing.
Stronger
Subject line
Your card ending 4242 expires this month

Hi Sam,

The Visa ending 4242 we have on file for your Acme plan expires at the end of November. Your next payment is on 3 December, so it would be declined unless the card is updated.

Updating takes about a minute: [Update my card]

If you have already updated it, thank you — you can ignore this note.

Why it works: The subject names the card, the body says the date and the consequence plainly, and one link goes straight to the update page.

More copy to borrow, including the later steps once a charge has actually failed, is in our dunning email templates.

Step 4: Add the guardrails

Pre-dunning only helps if it is polite and stops when it should. Put these in before you turn it on.

  1. De-duplicate. One email per customer per touch. Log what you sent and check the log before sending.
  2. Stop when the card changes. Re-check the payment method right before the second touch; if it no longer expires soon, skip it.
  3. Respect opt-outs. A blocklist or unsubscribe path is both courteous and a deliverability signal; see our deliverability guide for SPF, DKIM and DMARC.
  4. Skip customers with no email address. Nothing to send, and nothing to error on.
  5. Keep dunning ready. Some customers will not update. The normal retry and email sequence still has to catch them when the charge fails.
A card expiry check running daily, branching into customers to email, customers already updated and customers with no email on file, with the first group ending at an update-card page
The daily decision a pre-dunning job makes for every subscription: email, skip because they updated, or skip because there is nobody to email.

Step 5: Measure whether it worked

Track two simple numbers: how many customers you emailed about an expiring card, and how many of those updated before expiry. Divide the second by the first and you have an update rate for your own audience — we do not quote a benchmark for it because your mix of customers, plans and countries decides it. For the outcome, watch the first-attempt failure rate in Stripe's recovery analytics; Stripe itself suggests proactive reminders when that rate is high.

Annual plans deserve a special look: a card has a full year to expire before it is tested once, so the update rate there decides whether a whole renewal survives. We cover that case in how to reduce annual plan renewal failures. And once prevention is running, the failures that already happened are the next pot of money — the free Lost Revenue scan shows how large that backlog is.


Pre-dunning setup checklist

  • Stripe's Send emails about expiring cards toggle is on (or you have your own job replacing it).
  • You know whether your customers' cards live on the subscription, the customer, or both.
  • The email names the card, the date and one button; it has been sent to yourself as a test.
  • A second touch exists, and it skips customers who already updated.
  • De-duplication, an opt-out path and a log are in place.
  • You record emailed versus updated each month.

Frequently asked questions

What is pre-dunning?

Pre-dunning is contacting a customer about a payment problem before it happens — most often a saved card that is about to expire. Dunning reacts to a charge that has already failed; pre-dunning tries to make sure the charge never fails. It usually means an email, sometimes an in-app banner or SMS, that links to a page where the customer can update their card.

How far ahead of expiry should I email a customer?

A card stays valid through the last day of the month printed on it, so there is no hard rule. Stripe’s built-in expiring-card email goes out one month before expiry. Our recommendation is two touches: one roughly 30 days out and a short reminder about a week before the end of the expiry month, skipping the second for anyone who has already updated. Sending much earlier than a month tends to get ignored; sending later leaves no room for a second attempt.

Does Stripe send expiring-card emails by itself?

Only if you switch it on. In the Stripe Dashboard’s email notification settings you can turn on Send emails about expiring cards, which emails the customer one month before the card on file expires (their default payment method or default source) with a link to update it. The email uses your Stripe branding settings and you cannot change the timing or write your own copy through that toggle.

Do I still need pre-dunning if I have an Account Updater?

Usually yes, but it matters less. Account Updater services such as Visa Account Updater and Mastercard Automatic Billing Updater can silently refresh a reissued card, which removes some failures before they happen. They cannot help when a customer closed the account, was issued a new card by a bank that does not participate, or lets the card lapse. Pre-dunning covers those cases, and sending the later touch closer to expiry avoids emailing customers whose card was about to refresh itself.

Can I build pre-dunning myself with the Stripe API?

Yes. List your active and trialing subscriptions, expand the default payment method, read card.exp_month and card.exp_year, and email customers whose card expires this month or next. The work is in the edge cases: finding the right default payment method (subscription first, then the customer’s default), de-duplicating so nobody gets the same email twice, stopping once the card is updated, and logging what you sent. It is a reasonable weekend project and an ongoing maintenance job.

How does Revova’s pre-dunning work?

On Stripe, Revova runs a daily check across your active subscriptions, finds those whose default card expires this month or next, and sends an AI-written email with a secure link to update the card. It sends at most one pre-dunning email per customer per month, skips customers without an email address or on your blocklist, and tracks the expiring cards in a Customers In Danger panel. It is opt-in in Settings and currently runs on Stripe only.

Does Revova’s pre-dunning check cards that are saved only on the customer, not the subscription?

Not today. Revova reads the default payment method set on the subscription. A card that is stored only as the customer’s default, with no payment method set on the subscription itself, is skipped. If many of your customers fall into that group, a custom script or Stripe’s own expiring-card email, which looks at the default payment method or default source, will catch more of them.

How do I know pre-dunning is working?

Compare two numbers: how many customers you emailed about an expiring card, and how many of them updated before expiry. Then watch your first-attempt failure rate in Stripe’s recovery analytics, which Stripe itself points to as the signal for sending proactive reminders. If the failure rate on renewals falls while your recovery rate stays flat, prevention is doing its job.

Catch expiring cards before they fail

Turn on pre-dunning in minutes and see which customers are in danger this month. Starter is $29/mo, Pro is $79/mo, and the 14-day free trial needs no card.

Start my 14-day free trial →

No credit card · Free Lost Revenue scan · 30-day money-back guarantee

Found this useful? Tell Google you'd like to see more from us.