Use cases at a glance
Involuntary churn — losing customers to failed payments rather than cancellations — is your most recoverable churn. A failed payment caught in the first 24 hours has a 50%+ recovery rate. Waiting 7 days drops that to 10%. These agents catch payment failures before they become churn.
🚨 Failed Payment Alerts
Detect failed Stripe payments within hours. Flag accounts after 3 failed retry attempts to escalate.
📋 Dunning Status Monitoring
Track subscriptions in 'past_due' status and their retry schedule. Know exactly when retry #3 will occur.
💳 Expiring Card Alerts
Proactively flag cards expiring in 30, 14, and 3 days before they fail. Reduce involuntary churn by 20-40%.
💰 Refund Rate Tracking
Alert if refunds exceed 3% of weekly revenue (signal of refund abuse or quality issues).
⚖️ Dispute & Chargeback Alerts
Monitor disputes and chargebacks per account. High-disputers may need manual review or account suspension.
What is involuntary churn
Involuntary churn occurs when a customer loses service due to payment failure, not because they chose to cancel. Common causes:
- Expired or declined card: Card issued by bank is outdated or stolen
- Insufficient funds: Account doesn't have enough balance
- Billing address mismatch: AVS (Address Verification System) check fails
- 3D Secure authentication: Payment requires customer interaction they missed
Research shows 10-15% of SaaS churn is involuntary. Why it matters: (1) These customers often still want your product. (2) Early intervention recovers 50%+ of involuntary churners. (3) It's the cheapest churn to prevent — just proactive outreach.
✅ Impact: For a $100k MRR SaaS with 15% involuntary churn, that's $1,500/month in preventable churn. Catching failed payments 24 hours earlier via OpenClaw could recover $750/month in MRR.
Failed payment detection
Query Stripe for failed payment events in the last 24 hours. Alert after 3 consecutive failures (Stripe's Smart Retries typically allow 3 attempts).
agents:
failed-payment-monitor:
description: "Alert on failed Stripe payment events"
tools:
- stripe-api
config:
stripe_key: "${STRIPE_RESTRICTED_KEY}"
lookback_hours: 24 # check last 24 hours
events_to_monitor:
- payment_intent.payment_failed
- invoice.payment_action_required
filter_by:
exclude_statuses:
- "trial" # trials don't have payments
- "incomplete" # incomplete subscriptions
alert_on:
- single_failure: true
- consecutive_failures: 3 # after 3 failed retries
escalation_mrr: 500 # always alert if >$500 MRR account
output:
format: markdown
include_retry_schedule: true
include_email: true
heartbeats:
payment-failure-watch:
schedule: "0 * * * *" # every hour
agent: failed-payment-monitor
Dunning status monitoring
Track subscriptions in 'past_due' status (i.e., payments are failing and being retried). Show the customer's current retry schedule and when the final retry attempt will occur.
agents:
dunning-status-monitor:
description: "Monitor subscriptions in past_due status"
tools:
- stripe-api
- stripe-webhooks
config:
stripe_key: "${STRIPE_RESTRICTED_KEY}"
status_filters:
- past_due # subscription has failed payment(s) in retry
- past_due_not_active # subscription suspended pending retry success
include_fields:
- latest_invoice.payment_intent.status
- latest_invoice.next_payment_attempt
- subscription.billing_cycle_anchor
- customer.email
group_by: "customer_id"
time_in_past_due_threshold_hours: 72 # alert if > 3 days in past_due
output:
format: markdown
include_next_retry_timestamp: true
include_days_until_cancellation: true
heartbeats:
dunning-check:
schedule: "0 6 * * *" # daily at 6am
agent: dunning-status-monitor
Expiring card alerts
Proactively flag cards expiring within 30, 14, and 3 days. Send customers an update request before the card actually fails. Recovery rates: 30% at 30-day warning, 40% at 14-day, 50% at 3-day.
agents:
expiring-card-alert:
description: "Alert on cards expiring soon"
tools:
- stripe-api
config:
stripe_key: "${STRIPE_RESTRICTED_KEY}"
lookback_window_days: 120 # check cards expiring within 4 months
alert_tiers:
- days_until_expiry: 30
alert_type: "friendly_reminder"
template: "payment_method_expiring_30d"
- days_until_expiry: 14
alert_type: "urgent_reminder"
template: "payment_method_expiring_14d"
- days_until_expiry: 3
alert_type: "final_notice"
template: "payment_method_expiring_3d"
include_billing_portal_link: true # link to self-service update
exclude:
- plan == "free" # free plans have no payment method
output:
format: markdown
include_affected_accounts: true
include_mrr_at_risk: true
heartbeats:
expiring-cards-check:
schedule: "0 7 * * *" # daily at 7am
agent: expiring-card-alert
Refund rate tracking
Monitor refund volume and alert if the refund rate spikes (e.g., >3% of weekly revenue). High refund rates signal quality issues, abuse, or policy confusion.
agents:
refund-rate-tracker:
description: "Monitor refund rate for anomalies"
tools:
- stripe-api
config:
stripe_key: "${STRIPE_RESTRICTED_KEY}"
lookback_window_days: 7 # measure weekly
baseline_window_days: 90 # compare to 90-day baseline
metrics:
- refund_count
- refund_volume
- refund_rate_pct # refunds / revenue
alert_on:
- refund_rate_above_pct: 3.0 # alert if >3% of revenue
- spike_vs_baseline: 2.5 # alert if 2.5x higher than 90d avg
- single_refund_above: 1000 # alert if single refund > $1000
output:
format: markdown
include_top_refund_recipients: true
include_trend: true
heartbeats:
refund-watch:
schedule: "0 9 * * 1" # Mondays at 9am
agent: refund-rate-tracker
Dispute & chargeback alerts
Monitor chargebacks and disputes per account. Accounts with 3+ chargebacks may need manual review, customer education, or suspension.
agents:
dispute-chargeback-monitor:
description: "Alert on disputes and chargebacks"
tools:
- stripe-api
config:
stripe_key: "${STRIPE_RESTRICTED_KEY}"
lookback_window_days: 90
alert_on:
- chargeback_created: true
- dispute_created: true
- dispute_evidence_under_review: true
aggregate_by: "customer_id"
high_disputer_threshold: 3 # flag accounts with 3+ chargebacks/90d
output:
format: markdown
include_dispute_status: true
include_evidence_deadline: true
heartbeats:
chargeback-watch:
schedule: "0 8 * * *" # daily at 8am
agent: dispute-chargeback-monitor
HEARTBEAT templates
heartbeats:
# Failed payment watch — hourly
failed-payments:
schedule: "0 * * * *"
agent: failed-payment-monitor
# Dunning status — daily at 6am
dunning-check:
schedule: "0 6 * * *"
agent: dunning-status-monitor
# Expiring cards — daily at 7am
card-expiry-check:
schedule: "0 7 * * *"
agent: expiring-card-alert
# Refund rate — Mondays at 9am
refund-watch:
schedule: "0 9 * * 1"
agent: refund-rate-tracker
# Chargebacks — daily at 8am
chargeback-watch:
schedule: "0 8 * * *"
agent: dispute-chargeback-monitor
Sample billing health report
## Billing Health Report — Thursday, March 26, 2026
**Summary:** 12 payment failures detected. 3 accounts in past_due. 45 cards expiring within 30 days.
### 🚨 URGENT — Failed Payments (Last 24h)
1. **Acme Corp** — $2,400/mo
- Status: payment_intent.payment_failed
- Failed attempts: 1 of 3
- Next retry: March 27, 8:00am
- Card: •••• 4242, expires 05/27
- Action: Send friendly reminder about next retry
2. **Brightfield Inc** — $1,200/mo
- Status: invoice.payment_action_required
- Failed attempts: 3 of 3 (FINAL RETRY FAILED)
- Card: •••• 3782, expires 02/26 (EXPIRED)
- Action: ESCALATE — Card is expired. Manual outreach TODAY.
3. **TechVenture Labs** — $450/mo
- Status: payment_intent.payment_failed
- Failed attempts: 2 of 3
- Next retry: March 28, 3:00am
- Action: Monitoring
### 📋 In Dunning (Past Due Status)
- **Customer Alpha** — 4 days past due, 1 day until suspension
- **Customer Beta** — 2 days past due, 3 days until suspension
- **Customer Gamma** — 6 days past due, SUSPENDED (needs immediate recovery)
### 💳 Expiring Cards (30 Days)
- 45 cards expiring within 30 days
- 12 expiring within 14 days (HIGH PRIORITY)
- 3 expiring within 3 days (SEND FINAL NOTICE)
- Estimated MRR at risk: $28,500
### 💰 Refunds This Week
- Total refunds: $2,100 (0.9% of revenue)
- Status: Normal. Below 3% threshold.
FAQ
What is involuntary churn and why does it matter?
Involuntary churn is when a customer loses access due to failed payment, not because they chose to cancel. Estimates suggest 10-15% of SaaS churn is involuntary. Why it matters: (1) Involuntary churners often want to stay but had payment issues (expired card, billing address mismatch, insufficient funds). (2) You can recover them with proactive dunning and payment updates. (3) Catching failed payments in the first 24 hours recovers approximately 50% of lost MRR; by day 7 that drops to approximately 10%. Involuntary churn is the easiest churn to prevent.
How does Stripe's Smart Retries interact with my OpenClaw alerts?
Stripe's Smart Retries automatically retry failed payments on an intelligent schedule (3 retries over 6 days by default). Your OpenClaw failed-payment-monitor should not re-alert on retries; it should track the final status after all retries are exhausted. Configure your agent with lookback_hours: 168 (7 days) to see the full retry lifecycle, and alert only on subscriptions in 'past_due' status. This prevents alert fatigue from transient payment failures that Stripe will retry automatically.
What should I do when a card is flagged as expiring?
Recommended workflow: (1) When card expires in 30 days, send proactive email asking customer to update payment method in the billing portal. (2) If card expires in 14 days, send a second urgent email with update link. (3) If card expires in 3 days, flag for manual sales outreach if it's a high-MRR account. (4) For enterprise customers, reach out via their dedicated account manager. Most customers appreciate the reminder and update immediately. You'll recover 30-40% of expiring cards proactively this way, preventing involuntary churn before it happens.