Stripe Dunning Intelligence

Intelligent payment recovery with AI-personalized dunning.

Intelligent payment recovery from failed Stripe invoices. Webhook-triggered churn risk analysis with 5-signal CRS taxonomy (payment_failure_recurrence, plan_tier_value, usage_recency, tenure_depth, support_history) and 5 recovery strategies (gentle_reminder, urgency_nudge, value_reinforcement, payment_method_update, downgrade_offer). 3-way routing: urgent (CRS >= 7, email + Slack alert), standard (CRS 4-6, email), gentle (CRS < 4, email). Dual-model: Opus 4.6 for complex multi-signal churn risk scoring, Sonnet 4.6 for strategy-matched email composition. No web_search — all data from Stripe API. Companion to ERD: ERD captures expansion from successful payments, SDI prevents churn from failed payments.

triggerStripe Webhook01FetcherStripe Data02AnalystCRS Score03WriterDunning Email04Deliverer3-way RouteGmail+ Slack 7Gmail4–6Gmail< 4

Four Agents. Five CRS Signals. AI-Personalized Dunning.

Fetcher

Step 1Fetcher

Webhook + Code

Stripe Webhook fires on invoice.payment_failed. Fetcher pulls full customer context from Stripe API: subscription history, payment method metadata, invoice history, plan tier, recent charges, and customer lifetime value. Normalizes all signals into a unified risk assessment payload for downstream analysis.

Analyst

Step 2Analyst

Tier 1 Reasoning

Opus 4.6 performs multi-signal churn risk scoring across 5 CRS categories: payment_failure_recurrence (failure frequency, consecutive failures, pattern analysis), plan_tier_value (MRR at risk, plan tier, ARR impact), usage_recency (recent activity, feature adoption, engagement level), tenure_depth (customer tenure, onboarding completion, expansion history), and support_history (open tickets, sentiment, escalation history). Each signal scored 1–10 with weighted composite and evidence-based assessment. Selects one of 5 recovery strategies matched to risk profile.

Writer

Step 3Writer

Tier 2 Creative

Sonnet 4.6 composes a personalized dunning email matched to the selected recovery strategy: gentle_reminder (friendly nudge with payment link), urgency_nudge (deadline emphasis with consequences), value_reinforcement (highlight what they lose), payment_method_update (card expiry guidance), or downgrade_offer (retention with reduced tier). Tone, urgency, and messaging calibrated to CRS level.

Deliverer

Step 4Deliverer

Code + 3-way Route

Routes based on CRS composite score. Urgent (CRS ≥ 7): sends dunning email via Gmail AND posts Slack alert with account context for immediate human follow-up. Standard (CRS 4–6): sends dunning email via Gmail. Gentle (CRS < 4): sends soft reminder email via Gmail. All paths log delivery status and CRS metadata.

What It Does NOT Do

×

Does not retry failed payments — Stripe handles payment retries natively

×

Does not modify Stripe subscriptions or cancel accounts — sends outreach only

×

Does not monitor successful payments — that is what Expansion Revenue Detector does

×

Does not scrape external websites — all data from Stripe API

×

Does not monitor account health over time — that is what Account Health Intelligence Agent does

×

Does not re-engage dormant contacts — that is what Contact Re-Engagement Scorer does

The Complete Customer Success Bundle

9 files — workflow JSON, system prompts, configuration guides, and complete documentation.

stripe_dunning_intelligence_v1_0_0.jsonThe 28-node n8n workflow
README.md10-minute setup guide with Stripe webhook, Gmail, Slack, and Anthropic configuration
system_prompt_analyst.txtAnalyst system prompt (CRS 5-signal taxonomy, weighted scoring, strategy selection)
system_prompt_writer.txtWriter system prompt (5 recovery strategies, tone calibration, personalization rules)
crs_scoring_guide.mdCRS signal definitions, scoring calibration, and strategy mapping examples
stripe_webhook_setup.mdStripe webhook endpoint configuration for invoice.payment_failed events
email_templates_reference.mdRecovery strategy email examples and customization guidance
itp_results.mdITP test results — 20 records, 14/14 milestones, 74% exact strategy, 100% defensible
CHANGELOG.mdVersion history

Tested. Measured. Documented.

Every metric is ITP-measured. The Stripe Dunning Intelligence agent monitors failed Stripe invoices, scores churn risk across 5 signals with evidence-based assessment, selects from 5 recovery strategies, composes personalized dunning emails, and routes delivery based on risk severity at $0.132/invoice.

Workflow Nodes

28

Blueprint Quality Standard

12/12 PASS

Agent Architecture

4 agents — Fetcher (Code), Analyst (Tier 1 Reasoning, Opus 4.6), Writer (Tier 2 Creative, Sonnet 4.6), Deliverer (Code)

Required Credentials

Stripe (webhook), Gmail (OAuth2), Slack Bot Token, Anthropic API

Bundle Contents

9 files

Cost per Invoice

$0.132/invoice (ITP-measured, Opus Analyst + Sonnet Writer)

ITP Milestones

14/14 PASS (20 records, 74% exact strategy, 100% defensible)

n8n Compatibility

2.11.2

Stripe Dunning Intelligence v1.0.0 — Technical Reference━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Architecture: 28 n8n nodes, 4 agents (Fetcher → Analyst → Writer → Deliverer)Trigger:      Stripe Webhook (invoice.payment_failed)Input:        Stripe API — customer, subscription, invoice, payment historyIntelligence: Opus 4.6 (CRS scoring) + Sonnet 4.6 (dunning email)Output:       Gmail (dunning email) + Slack (urgent alerts, CRS ≥ 7)Cost:         $0.132/invoice (ITP-measured average)ITP:          20 records, 14/14 milestones PASS, 74% exact strategy, 100% defensibleBQS:          12/12 PASSTool A:       Stripe (input — invoice events, customer data, payment history)Tool B:       Gmail (output — personalized dunning emails)Tool C:       Slack (output — urgent churn risk alerts)Intelligence: 5-signal CRS + 5 recovery strategies + 3-way routingCost Value:   0.132

What You'll Need

Platform

n8n 2.11.2+

Est. Monthly API Cost

$13–20/month (100 failed invoices/month)

Credentials Required

  • Anthropic API
  • Stripe (webhook endpoint)
  • Gmail OAuth2
  • Slack Bot Token

Services

  • Stripe account (with webhook endpoint configured)
  • Gmail (Google Workspace or personal)
  • Slack workspace

Setup Track

Quick Start

~15 min

All credentials live, n8n running

Full Setup

1–2 hrs

Needs API config + tables

From Scratch

2–4 hrs

No n8n, no credentials

Stripe Dunning Intelligence v1.0.0

$199

one-time purchase

What you get:

  • Production-ready 28-node n8n workflow — import and deploy
  • Stripe Webhook integration for invoice.payment_failed events
  • 5-signal CRS taxonomy: payment failure recurrence, plan tier value, usage recency, tenure depth, support history
  • Per-signal scoring (1–10) with weighted composite and evidence-based churn risk assessment
  • 5 recovery strategies: gentle reminder, urgency nudge, value reinforcement, payment method update, downgrade offer
  • AI-personalized dunning emails matched to recovery strategy and churn risk level
  • 3-way routing: urgent (email + Slack alert), standard (email), gentle (soft reminder)
  • Slack alerts for high-risk accounts (CRS ≥ 7) with full account context
  • Dual-model: Opus 4.6 (CRS analysis) + Sonnet 4.6 (email composition) at $0.132/invoice
  • ITP test results with 20 records, 14/14 milestones, 100% defensible
  • All sales final after download

Frequently Asked Questions

How does it differ from Expansion Revenue Detector?+

Complementary products covering opposite sides of the payment lifecycle. ERD monitors invoice.paid events and scores expansion potential from successful payments. SDI monitors invoice.payment_failed events and scores churn risk from failed payments. ERD captures upsell opportunities; SDI prevents revenue loss. Use both together for complete payment intelligence.

What are the five CRS signals?+

Payment Failure Recurrence (failure frequency, consecutive failures, pattern analysis), Plan Tier Value (MRR at risk, plan tier, ARR impact), Usage Recency (recent activity, feature adoption, engagement level), Tenure Depth (customer tenure, onboarding completion, expansion history), and Support History (open tickets, sentiment, escalation history). Each scored 1–10 with weighted composite.

What are the five recovery strategies?+

Gentle Reminder (friendly nudge with payment link), Urgency Nudge (deadline emphasis with consequences), Value Reinforcement (highlight what they lose), Payment Method Update (card expiry guidance and update instructions), and Downgrade Offer (retention with reduced tier option). Strategy is selected by the Analyst based on CRS profile.

When does Slack fire?+

Only for urgent accounts with CRS ≥ 7 (high churn risk). Most invoices are handled via email only. Slack alerts include full account context so your team can follow up immediately on accounts most likely to churn. Standard and gentle bands receive email-only treatment.

Why does it use both Opus and Sonnet?+

Opus 4.6 handles the Analyst role because multi-signal churn risk scoring with evidence-based assessment across 5 categories and strategy selection requires deep reasoning capability. Sonnet 4.6 handles the Writer role where strategy-matched email composition benefits from creative fluency at lower cost. This dual-model architecture balances analytical depth with cost efficiency at $0.132/invoice.

How much does each invoice cost to process?+

ITP-measured: $0.132/invoice blended average with Opus 4.6 Analyst and Sonnet 4.6 Writer. No web_search cost — all data comes from Stripe API. 100 failed invoices/month costs approximately $13.20/month in LLM usage.

Does it use web scraping?+

No. All data comes from the Stripe API: customer records, subscription details, invoice history, payment metadata, and charge history. No web_search, no external data sources, no scraping. This makes the pipeline faster and more reliable than products that depend on external web data.

Does it automatically retry the payment?+

No — SDI does not retry payments. Stripe handles payment retries natively through its Smart Retries or configured retry schedule. SDI adds intelligence on top of Stripe’s retry mechanism: it analyzes why the payment failed, scores churn risk, and sends personalized outreach to recover the customer relationship. It complements Stripe’s dunning, not replaces it.

Is there a refund policy?+

All sales are final after download. Review the Blueprint Dependency Matrix and prerequisites before purchase. Questions? Contact support@forgeworkflows.com before buying. Full terms at forgeworkflows.com/legal.

Related Blueprints