Inspiration

Subscription businesses lose a large share of their customers to failed payments, not to people choosing to cancel. A card expires, a balance runs low, a bank declines a charge, and the subscriber quietly drops off. Creators, indie SaaS founders and small membership sites feel this the most: they don't have a retention team, and most of them only send one generic "your payment failed" email that nobody reads. We wanted to give every small subscription business an always-on retention agent that saves those customers automatically.

What it does

Churn Rescue watches a merchant's PayPal subscriptions and steps in the moment a payment fails.

  • Detects failures in real time using PayPal webhooks (for example BILLING.SUBSCRIPTION.PAYMENT.FAILED and BILLING.SUBSCRIPTION.SUSPENDED).
  • Understands the customer. An AI agent reads the subscriber's history from the PayPal Subscriptions API: plan, tenure, past payments and previous failures.
  • Chooses the right rescue offer. Instead of a generic dunning email, the agent picks the best path for that person: retry the payment, pause for a month, or switch to a cheaper plan. It explains its reasoning to the merchant.
  • Writes a personal message in the merchant's tone of voice, with a one-click link for the customer.
  • Acts through PayPal. When the customer chooses, Churn Rescue applies it through the PayPal Subscriptions API: it reactivates, suspends or revises the subscription to a new plan. A human-approval mode lets the merchant review every action first.
  • Shows the money saved. A dashboard tracks failed payments, rescue attempts, recovered subscriptions and recovered monthly revenue.

How we built it

  • PayPal: Subscriptions API (plans, subscription details, revise, suspend, activate), Webhooks for payment-failure events, and the PayPal sandbox with the webhook simulator to generate realistic failure scenarios.
  • AI: Claude decides the best offer for each subscriber, explains why, and drafts the outreach message. The agent's PayPal actions are exposed as tools, following the PayPal Agent Toolkit approach, so the model can only take allowed, auditable actions.
  • App: Node.js + Express with a vanilla JS merchant dashboard and a customer-facing offer page.
  • Runs anywhere: with no keys it starts in a clearly labelled demo mode (an in-memory mock of the PayPal Subscriptions API with the same response shapes, plus a simple rules fallback instead of Claude), so judges can try it in one command. Add PayPal sandbox and Anthropic keys and it makes real PayPal sandbox calls and uses the Claude agent. The demo video was recorded in demo mode.

Challenges we ran into

Getting realistic failed-payment data in the sandbox took work, so we combined the PayPal webhook simulator with seeded subscriber histories. We also had to make sure the AI could never take a money action without guardrails: every action goes through a fixed set of PayPal tools, with limits and an approval step.

Accomplishments that we're proud of

An end-to-end loop that runs entirely on PayPal: a payment fails, the agent reasons about the customer, sends a personal offer, and the subscription is saved through the PayPal API, with the recovered revenue visible on the dashboard.

What we learned

Dunning is a decision problem, not just an email problem. The right offer depends on who the customer is, and AI is good at making that call when it has the subscriber's history and a safe set of actions.

What's next for Churn Rescue

Smarter retry timing, A/B testing of offers, multi-language outreach, and a Zapier integration so merchants can plug rescue events into the tools they already use.

Built With

Share this project:

Updates

Submission history