Recover failed subscription payments before they churn

The moment a subscription payment fails, your billing team gets a Slack alert with the at-risk revenue and a ready-to-send recovery email.

Agentic Task
ChargebeeSlack BotGmailFinanceOperationsNotifications & AlertsEmail Automation
PromptCreate

When Chargebee reports a failed subscription payment, kick off a revenue recovery run. Trigger this workflow with a Chargebee webhook subscribed to the payment_failed event. The webhook payload identifies the affected customer and subscription (and usually the related invoice and transaction), so pull those identifiers from the incoming event to start.

Use Chargebee Retrieve Customer to get the customer's name, company, and email, along with their primary card on file. Then use Chargebee Retrieve Subscription to get the plan or item they are on, the monthly recurring value of the subscription, its current status, and the dunning details, specifically how many payment retries have already failed and whether the subscription is close to being cancelled by the dunning cycle. Remember that Chargebee money amounts are integers in the currency's smallest unit (for example cents), so convert them to a normal dollar figure before you report them.

Work out the at-risk monthly recurring revenue for this subscription and use it to judge how urgent the failure is. Treat higher-value subscriptions as higher priority, and raise a clear churn-risk flag when the subscription is near the end of its retry cycle and about to be cancelled, so the team can intervene before it churns.

Post a Slack alert to the billing channel with Slack Bot Send a Message. Summarize who failed (customer name and company), the at-risk MRR, the plan they are on, the reason the payment was declined, and how many dunning retries have already failed. Lead with and emphasize the at-risk revenue so higher-value accounts stand out, and call out any subscription that is close to cancellation so someone picks it up first.

In the same run, draft a friendly, personalized card-update email in Gmail with Create a Draft. Address the customer by name, reference the specific plan they are on, explain warmly that their latest payment did not go through, and ask them to update their card details to keep their subscription active. Keep the tone helpful rather than alarming. Leave it as a draft and do not send it, so a teammate can review, personalize further, and send it themselves.

Additional information

What does this prompt do?
  • Watches your billing system and springs into action the instant a subscription payment fails.
  • Posts a Slack alert to your billing channel with who failed, the monthly revenue at risk, and why the payment bounced.
  • Prioritizes your highest-value subscriptions and flags accounts about to be canceled by the payment retry cycle.
  • Drafts a friendly, personalized card-update email in Gmail that a teammate can review and send.
What do I need to use this?
  • A Chargebee account for your subscription billing.
  • A Slack workspace with a billing or revenue channel.
  • A Gmail account to hold the draft recovery emails.
How can I customize it?
  • Choose which Slack channel receives the failed-payment alerts.
  • Set the revenue level that marks a subscription as high priority.
  • Adjust the tone and wording of the recovery email draft.

Frequently asked questions

When does this run?
It runs automatically the moment Chargebee reports a failed subscription payment, so your team hears about at-risk revenue right away instead of finding out days later.
Does it email the customer automatically?
No. It writes a friendly recovery email as a Gmail draft so a teammate can review, tweak, and send it. Nothing goes out to a customer without a human.
How does it decide which failures matter most?
It leads with your highest-value subscriptions and flags any account that is close to being canceled by the payment retry cycle, so your team can save the biggest revenue first.
What goes in the Slack alert?
The customer's name and company, the plan they are on, the monthly revenue at risk, how many retries have already failed, and the reason the payment was declined.
Will it work with my dunning settings?
Yes. It reads how many retries Chargebee has already attempted and warns you when a subscription is near the end of its retry cycle, so you can step in before it churns.

Stop losing subscribers to failed payments.

Get an instant alert and a ready-to-send recovery email the moment a payment fails, so your team can save the revenue before it churns.