The moment it happens
Report failed Chargebee payments in Slack
One message per failed invoice with the customer, amount and reason, even while dunning keeps retrying.
- Runs
- The moment it happens
- Apps
- Chargebee
- AI
- Not needed
- Access
- read-only key; admin sets webhook
Send this to your assistant
Create a ClickRuntime automation: when a Chargebee payment fails, post the customer, amount and failure reason to #billing in Slack. Alert only once per invoice.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A failed payment is a small emergency that looks like routine noise. The card declines, Chargebee records a failed transaction, and unless someone is watching the billing screen, nobody knows until the retry window has closed. For a company with a few hundred subscriptions, that gap is where recurring revenue quietly slips away.
As soon as Chargebee reports a payment failure, this reads the event, pulls out the transaction details and the customer behind it, and posts a clear message to the channel you choose. The person on billing duty can see who, how much and why it failed without logging in.
Teams with high-value accounts get the most from it, since a fast personal email can save a renewal that automated retries would lose. The alert is built from Chargebee's own event data, so what the team reads in Slack matches exactly what the billing system recorded about the failed charge.
What you get out of it
Reach the customer while retries remain
Chargebee retries failed charges on a schedule. If you contact the customer after the first failure, they can update the card before the final attempt, and the account never lapses or loses access.
Know which failures matter most
The post names the customer and the amount, so you can triage. A $29 monthly failure can wait for the retry. A $9,000 annual one deserves a phone call that afternoon. Large accounts get a personal call or note instead of the generic automated email that smaller plans receive.
Stop relying on someone checking billing
Nobody watches a billing dashboard all day. A message in the channel the team already reads means failures are seen by whoever is online, including after hours when handing off to a teammate is easy.
Spot a pattern across many failures
Several failures arriving in an hour in the same channel often point to a gateway outage or a changed integration rather than customer cards. Seeing them grouped lets you raise the issue with your payment provider quickly.
Leave a timestamped trail for audits
Each alert is a dated record that a failure was known and when. If a customer later disputes a suspension, you can show exactly when the team was told and acted. The record is also handy when you compare months and want to know whether failures are rising or falling.
How it works
What happens, step by step
When a payment fails in Chargebee, Chargebee tells ClickRuntime straight away.
ClickRuntime picks out the customer, the amount and the reason it failed.
A message goes to your #billing Slack channel with those details, such as "Insufficient funds".
Before it runs live
- Connect Chargebee
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Chargebee steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, state, notify
def from_chargebee(event):
return event.header("Authorization") == credentials.secret("CHARGEBEE_WEBHOOK_AUTH") # "Basic ..." set on the webhook
@on_event
def handle(event):
if not from_chargebee(event):
return {"posted": False, "reason": "unauthorised"}
body = event.json
if body["event_type"] != "payment_failed":
return {"posted": False}
c, txn = body["content"]["customer"], body["content"]["transaction"]
invoice_id = (body["content"].get("invoice") or {}).get("id", txn["id"])
if state.get(f"alerted:{invoice_id}"):
return {"posted": False, "reason": "already alerted"}
name = c.get("company") or c.get("email")
notify.slack(f"💳 Payment failed: {name}, {txn['currency_code']} {txn['amount'] / 100:,.2f}\n"
f"Reason: {txn.get('error_text') or txn.get('error_code') or 'unknown'}", channel="#billing")
state.set(f"alerted:{invoice_id}", True)
return {"invoice": invoice_id}FAQ
Common questions
Does it alert on every retry or only the first failure?
What details appear in the message?
Is the incoming webhook secure?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Announce new Chargebee subscriptions in Slack
Each new subscription is posted with the customer, plan and amount as soon as it's created.
See how it worksGet a Slack alert with the MRR lost when a customer cancels
Every cancellation is flagged with how much monthly revenue it removes, so account owners can step in.
See how it worksPost Chargebee plan upgrades and downgrades to Slack
When a Chargebee subscription changes plan, Slack gets a message saying whether it was an upgrade or a downgrade, with the old and new plan and the MRR change.
See how it worksKeep exploring
Set up “Report failed Chargebee payments in Slack” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.