n8n Workflow: Stripe Failed Payment Recovery
Automatically recover failed Stripe payments. Detect failures, send dunning emails, retry charges, and update subscription status.

How This Blueprint Works
Involuntary churn from failed payments is every SaaS company’s silent revenue leak. This workflow listens for Stripe invoice.payment_failed events and runs a smart dunning sequence: email the customer, retry the charge on a schedule, escalate to a higher-performing card, and finally downgrade the subscription.

The Execution Sequence
- Stripe Trigger Node — Uses the Stripe Trigger node to subscribe to invoice.payment_failed events. Fires instantly when a credit card charge fails. Captures invoice ID, customer ID, amount_due, and failure code (card_declined, insufficient_funds, expired_card, etc.).
- Customer Lookup Node — An HTTP Request node that calls GET /v1/customers/{id} with the Stripe secret key. Retrieves customer email, name, phone, and payment_methods list. Identifies if there is a secondary payment method available for retries.
- Dunning Sequencer Node — A Code node running the recovery sequence: Day 1 — send email notification + retry charge immediately. Day 3 — send reminder email + retry with updated card if available. Day 7 — final email + retry. Each touch increments urgency tone.
- Email + Retry Node — An HTTP Request node that sends personalized dunning emails via SendGrid/SMTP. The email includes a secure payment link (Stripe Hosted Invoice Page). The same node retries the charge using Stripe’s /v1/invoices/{id}/pay endpoint.
- Subscription Downgrader Node — If all retries exhaust, calls Stripe API to update the subscription to a free tier or limited access plan. Logs the downgrade to a Google Sheet for customer success team follow-up.
FAQ
What Stripe events can this workflow handle?
Primary: invoice.payment_failed. Also handles payment_intent.payment_failed, invoice.payment_action_required (SCA 3D Secure), and customer.subscription.updated for post-recovery status tracking.
How does smart card retry work?
The workflow checks the customer’s default_payment_method. If the failure was on a card, and the customer has another card saved, it sets the backup card as the new default and retries. This recovers ~15% of failed payments.
Can I customize the dunning email timing?
Yes. The dunning schedule is configured as variables in the Code node (touch_1_delay, touch_2_delay, touch_3_delay). Default: immediate, 72 hours, 168 hours (7 days). Adjust per business model — SaaS typically gives more time than e-commerce.
The JSON Blueprint Structure
{
"name": "Stripe Smart Dunning",
"nodes": [
{ "name": "Stripe Trigger", "type": "n8n-nodes-base.stripeTrigger", "position": [250, 300] },
{ "name": "Customer API", "type": "n8n-nodes-base.httpRequest", "position": [450, 300] },
{ "name": "Dunning Logic", "type": "n8n-nodes-base.code", "position": [650, 300] },
{ "name": "SendGrid Email", "type": "n8n-nodes-base.httpRequest", "position": [850, 300] }
]
}
What You Get Inside Your SynthOperator System
This workflow is one of 27,400+ blueprints included in the n8n Business Automation OS ($17, one-time). When you deploy the complete system, you get:
- 27,400+ pre-built workflow JSON files across every business domain
- 15 elite AI agents integrated into your automation pipelines
- Lifetime updates, offline operation, and zero recurring fees
**Deploy your complete automation infrastructure today.
System Requirements
Operational Benefits
Trusted by Operators
"Deployed the full OS across 7 client accounts in week one. The 27K template library meant I stopped building workflows from scratch — I search, import, configure credentials, and deploy. Estimated 80+ hours/month saved in workflow development alone. The 15 AI agents replaced $12K/month in contractor overhead."
"The infrastructure architecture is production-grade. I've run 15,000+ workflow executions over 90 days with zero critical failures. The error-handling patterns (retry logic, dead-letter queues, Slack alerting) are already wired in. I spent 3 years building similar tooling in-house — this saved me 6+ months of engineering."
Free: Top 10 n8n Workflows
Get 10 industrial-grade n8n blueprints — ready to import into any instance. Save 10h/week with these ready-to-deploy automations.
- Industrial-grade n8n blueprints
- Recursive Claude subagent instructions
- Localhost deployment guide
- Lifetime update protocol