Failed payment recovery playbook · for ecommerce brands

Save failed subscription orders with Stripe, n8n, Klaviyo and Twilio

Ecommerce brands selling subscription boxes or refills on Stripe Billing who already email from Klaviyo and collect consent for account texts.

  • Stripe
  • n8n
  • Klaviyo
  • Twilio
Tools
Stripe, n8n, Klaviyo and Twilio
Tool cost
About $20 a month at list price, one seat each, plus Stripe, n8n and Twilio
It moves
MRR recovered from failed subscription payments each month

What does this playbook get you?

  • Every failed renewal gets retried on a schedule you chose, with a clear end state when retries run out.
  • Every customer with a failed payment gets a link to pay or update their card, by email at least and in-app or by text where you have consent.
  • Failures above your MRR threshold reach a named person the same day, with the amount and the retry count.
  • One place shows failed MRR, recovered MRR and what is still at risk, by month.

Who should pick something else?

Stores whose subscriptions bill through a Shopify subscription app instead of Stripe, or brands with no opt-in for texts.

Which tools does this stack use, and what do they cost?

ToolRoleList price
StripeBilling and retriesUsage-based (opens in a new tab)
n8nAutomationSee the pricing page (opens in a new tab)
KlaviyoCustomer messagesFrom $20 a month (opens in a new tab)
TwilioText nudgesUsage-based (opens in a new tab)

Prices from each vendor's own pricing page, checked 2026-11-28. Plans change, so confirm before you buy.

How does data move through this stack?

  1. StripeBilling and retries
  2. n8nAutomation
  3. KlaviyoCustomer messages
  4. TwilioText nudges

How do you build it?

How do you set up retries and card updates in the billing tool in Stripe?

  1. In the Stripe Dashboard, go to Billing > Revenue recovery > Retries and turn on Smart Retries. New accounts start at up to 8 retries within 2 weeks; the window can be 1 week, 2 weeks, 3 weeks, 1 month or 2 months.
  2. On the same page, pick what happens when retries run out: cancel the subscription, mark it unpaid, leave it past due, or pause it if it is eligible.
  3. In the revenue recovery email settings, decide on Send emails when card payments fail (off if another tool sends dunning) and turn on Send emails about expiring cards. Set the update link to the Stripe-hosted page.
  4. In Workbench, add an event destination for invoice.payment_failed and invoice.paid so the rest of the stack hears about each failure and each save.
  5. Each week, open Billing > Revenue recovery for failed payments, recovery rate, recovered volume by method and the top customers still in recovery.

Watch for: Retries charge the subscription's default payment method before the customer's, so a new card saved only on the customer can be skipped when the subscription has its own default.

FromToWhy
invoice.customer_emailPerson or contact emailMatches the failure to the right person downstream.
invoice.amount_dueAmount dueIn the smallest currency unit, so cents for USD.
invoice.attempt_countRetry numberCounts the first attempt plus automatic retries.
invoice.hosted_invoice_urlPay linkStripe's hosted page where the customer can pay the open invoice.
invoice.billing_reasonFiltersubscription_cycle marks a renewal, which is what you want to recover.

How do you route each failure to the right tools in n8n?

  1. Add a Stripe Trigger node with your Stripe credential and select the Invoice Payment_failed and Invoice Paid events.
  2. Set a Signature Secret on the Stripe credential so the node checks the Stripe-Signature header and rejects unsigned or stale requests.
  3. Add an IF node so only renewals (billing_reason subscription_cycle) continue, then a Switch on attempt_count for first try versus final try.
  4. Add an HTTP Request node for Klaviyo and a Twilio node (SMS: Send) for customers with texting consent, both in the same run.

Watch for: Without a Signature Secret on the credential, the Stripe Trigger accepts any request, so anyone who finds the URL can fire fake failures.

How do you send the dunning messages in your own voice in Klaviyo?

  1. Have the automation POST a Payment Failed event to https://a.klaviyo.com/api/events with a private key that has events:write and the revision header.
  2. Send the profile email, value as the amount due, and the pay link and attempt number in properties.
  3. Set unique_id to the invoice ID plus attempt number so a repeated webhook records one event, not two.
  4. Once a test event lands, create a flow with Payment Failed as its trigger and add a split on payment_status so recovered profiles stop getting emails.

Watch for: Events trigger flows by default, so set backfill to true when you load old failures or past customers get a dunning email.

How do you send a compliant text nudge in Twilio?

  1. Register your brand and an A2P 10DLC campaign in Twilio before the first send; unregistered 10DLC traffic to US numbers is blocked with error 30034.
  2. Add the sending number to the Messaging Service tied to the approved campaign.
  3. Text only customers who opted in to account texts, with your brand name, what failed and one link.
  4. Honor STOP replies and keep it to one or two texts per failed invoice.

Watch for: If the number isn't in the Sender Pool of the Messaging Service linked to the approved campaign, texts still fail with 30034 after registration.

How do Stripe and n8n connect?

The n8n Stripe Trigger node listens for Invoice Payment_failed and Invoice Paid with your Stripe credential.

A Signature Secret on that credential makes n8n verify every request before the workflow runs.

How do n8n and Klaviyo connect?

n8n has no native Klaviyo node, so an HTTP Request node posts to Klaviyo's Create Event endpoint.

The event name becomes a metric, and that metric triggers the Klaviyo flow.

How do Klaviyo and Twilio connect?

Klaviyo and Twilio don't connect in this build; n8n calls both in the same run.

n8n writes sms_sent into the Klaviyo event properties so the flow can change its copy for people who just got a text.

What numbers should this playbook move?

The formula: Recovered MRR = MRR x share that fails on renewal x share recovered

  • Retry timing moves soft declines recovered. Adaptive retries try again when the charge is more likely to clear, with no work from the customer.
  • Card update friction moves hard declines recovered. A link straight to a hosted page to pay or add a card removes the login and the hunt for billing settings.
  • Reach moves customers who see the ask. Email plus an in-app prompt or a text reaches people who never open billing mail.
  • Human follow-up moves big accounts saved. A Slack alert or CRM task puts a person on failures above your threshold before the window closes.

What does the math look like for this stack?

A worked example, not a benchmark. Swap in your own numbers. The tool cost uses this stack's list prices, about $20 a month.

Example inputValue
MRR on subscriptions$60,000
Share of MRR that fails on renewal5%
Share of failed MRR you recover50%
ResultValue
Failed MRR a month$3,000
MRR recovered a month$1,500
MRR still lost a month$1,500
Extra MRR per 10 points of recovery$300
Recovered MRR per tool dollar75x
  • The fail and recovery shares are assumptions for the example, not benchmarks. Read your real numbers from your billing tool's recovery report.
  • Billing fees that scale with volume, and usage pricing for texts and automation, aren't in the tool cost.
  • Recovered MRR counts once in the month it comes back; it doesn't add the months that customer keeps paying.

Why pick this stack?

Consumer subscriptions fail for boring reasons: a new card after a lost wallet, a debit card running low the day before payday. Smart Retries handles the second kind well, since it picks retry times from signals about when that card tends to clear. The first kind needs the customer to act, and shoppers don't read billing email the way a SaaS admin does. That's the case for a text.

n8n sits in the middle because it's the one piece that can talk to all three. The Stripe Trigger node catches invoice.payment_failed and invoice.paid. An HTTP Request node posts a Payment Failed event to Klaviyo, and a Twilio node sends the text, both in the same run. A Switch on attempt_count lets the first failure get email and text while the middle retries get email only. Self-host n8n if someone on the team can keep a server up; otherwise use n8n Cloud, which is priced in euros.

Klaviyo owns the email because your templates and sender reputation already live there. Pass value as the amount due so the flow can split large boxes from small ones, and pass unique_id as the invoice ID plus attempt_count so a repeated webhook never fires the flow twice. Careful with the first backfill: events trigger flows by default, so set backfill to true when you load old failures.

The text is where you can get hurt. Register your brand and an A2P 10DLC campaign in Twilio before the first send, because unregistered 10DLC traffic to US numbers gets blocked. Text only people who opted in to account texts, send one on the first failure and maybe one before the last retry, and honor STOP. Keep discounts out of it. A dunning text is a service message, and mixing in a promo changes what consent you need.

Keep the channels from contradicting each other. Klaviyo and Twilio never talk directly here, so n8n writes sms_sent into the event properties and the flow adjusts its first email for anyone who just got a text. One clear ask per channel beats three that overlap. Check Stripe's Revenue recovery page each month too: its Other bucket counts payments recovered outside Stripe's own retries and emails, which is where saves from your own messages can show up.

What breaks, and how do you fix it?

What breaksThe fix
Customers get two different failure emails for one invoice.Pick one sender per message. If your own tool sends dunning, turn off the billing tool's failed payment email.
Retries keep running on a card that can never succeed.Hard declines like a lost or stolen card need a new card, so the message must ask for one, not promise a retry.
A customer who already paid still gets a final notice.Check payment status right before every send, not only when the sequence starts.
The log and the billing tool disagree on recovered MRR.Webhooks can arrive late or not at all. Reconcile against the billing tool's report each month and treat it as the truth.

Questions about this stack

Why use Twilio when Klaviyo can send SMS too?

Klaviyo sells SMS as an add-on, and if you already pay for it, use it and drop Twilio from this build. Twilio fits brands that keep Klaviyo on email only, or that already send order and account texts from a Twilio number. Either way, you need opt-in consent for account texts before n8n sends anything.

What should the dunning text say?

Brand name, what failed and one link. Something like: Your box from your brand didn't go through, update your card here, then the link, then reply STOP to opt out. Use Stripe's hosted_invoice_url so they can pay the open invoice right away. Skip emoji, promos and fake urgency, so it reads like the service message it is.

Does the n8n workflow need to verify Stripe's webhook?

Yes. Set a Signature Secret on the Stripe credential in n8n. With it, the Stripe Trigger node rejects unsigned, forged or stale requests with a 401 and the workflow never runs. Without it, anyone who finds the URL could fake failures and text your customers, which is a consent problem you don't want to explain.

What is involuntary churn?

It is a customer lost to a failed payment rather than a choice to cancel. The card expired, was replaced or was declined, and nothing got a new one before the subscription ended.

How long should the recovery window be?

Long enough for the retries and three or four messages, short enough that you aren't giving months of free service. Most billing tools default to a few weeks; start there and adjust from your own recovery data.

Should I cut off access while a payment is failing?

Not on the first failure. Keep access during the window and show an in-app prompt, then pause or limit access at the end. Locking people out on day one punishes a customer who wants to pay.

Want us to build this?

We can set up failed payment recovery on Stripe, n8n, Klaviyo and Twilio for you: Stripe, n8n, Klaviyo and Twilio connected in your own accounts, tested with real records and handed over with a short guide your team can follow. You'll know it works because mRR recovered from failed subscription payments each month is tracked from the first week.

Most builds like this are a flat-fee Done-for-you Playbooks install. Tell us your stack on a short call and you'll leave with a fixed scope and price.

Free to copy, and staying free

If this saved your team a build, an optional $5 tip helps cover what it costs to keep these current. Nothing unlocks, and every template and playbook stays free.

Buy us a coffeeTip us for the free templates (optional tip, $5 suggested, opens Stripe in a new tab)

Startup? Let's talk.

20 minute fit call. You'll leave knowing the first thing we'd fix and roughly what it costs. If we're not the right fit, we'll tell you who is.