dunning-escalation

Automates a four-rung dunning ladder to recover failed Stripe subscription payments.

20.2k|3.4k|Updated Oct 5, 2024
One-click install
npx skills add https://github.com/kortix-ai/suna --skill dunning-escalation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dunning-escalation
Source: https://github.com/kortix-ai/suna/tree/main/packages/starter/templates/marketplace/runtime/skills/dunning-escalation
Command: npx skills add https://github.com/kortix-ai/suna --skill dunning-escalation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Failed Stripe subscription payments often lapse silently or trigger chaotic, untracked retry emails. This Skill turns each failed invoice into a structured recovery workflow with a fixed escalation ladder, enforced wait times, and a persistent ledger so no subscription is over-emailed, skipped, or forgotten.

Core Features & Use Cases

  • Four-Rung Escalation Ladder: Progresses each failing subscription through smart retry, payment reminder, update-your-card notice, and final notice, with minimum waits of 24h, 48h, and 72h between rungs.
  • Persistent State Ledger: Tracks every subscription's rung, last action, and next-eligible escalation time in .kortix/memory/payment-recovery-ledger.md so hourly cron runs resume exactly where they left off.
  • Human Handoff Guardrails: Stops at rung 4, marks subscriptions awaiting-human, and never cancels, credits, or refunds — those decisions stay with people.
  • Use Case: A SaaS company runs an hourly payment-recovery sweep; the Skill retries a failed charge, emails the billing contact two days later if still failing, and posts a Slack summary of recoveries and accounts needing human attention.

Quick Start

Run the hourly payment-recovery sweep to check Stripe for failed invoices and advance each affected subscription one rung on the dunning ladder.

Frequently Asked Questions about dunning-escalation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate failed Stripe payment recovery?

Use a dunning ladder that retries the failed charge off-session first, then sends staged reminder emails at increasing intervals. This Skill runs four rungs — smart retry, payment reminder, update-your-card notice, and final notice — with 24h, 48h, and 72h minimum waits between them.

How to track dunning email state across scheduled runs?

Persist each subscription's current rung, last action timestamp, and next-eligible escalation time in a ledger file. The ledger at `.kortix/memory/payment-recovery-ledger.md` is read at the start of every run and rewritten before the run ends, so state is never inferred or guessed.

Can the dunning process cancel or refund a subscription automatically?

No. After the final notice (rung 4), the subscription is marked `awaiting-human` and surfaced in every summary until a person acts. Cancellation, credits, and refunds always require a human decision and are never performed automatically.

What happens when a failed Stripe invoice gets paid mid-ladder?

The invoice status is checked fresh from Stripe every run. Once paid, the subscription is marked `recovered` on the ledger with the rung it cleared at, all emails stop immediately, and the recovery is reported in the run summary.

Why does a subscription not advance a rung on every hourly run?

Each rung has a minimum wait time — 24h after rung 1, 48h after rung 2, 72h after rung 3 — and a subscription advances at most one rung per run. If the wait has not elapsed, the subscription is left untouched even if the run is manually re-triggered.