The moment it happens
Get alerted when a payment fails
Each failed charge or invoice payment shows up in Slack with the customer, amount and reason.
- Runs
- The moment it happens
- Apps
- Stripe
- AI
- Not needed
- Access
- read (Charges, Invoices, Customers); webhook endpoint created by user
Send this to your assistant
Create a ClickRuntime automation: when a Stripe payment or invoice fails, post the customer, amount and failure reason to #billing in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A card declines for a customer with an annual plan, Stripe retries on its schedule, and the finance lead only hears about it when the dunning emails start generating support tickets. Meanwhile, an expired card, insufficient funds and a fraud decline all look the same in a list of failed charges, even though each needs a different response from your team.
As soon as Stripe emits a payment failed event, ClickRuntime verifies the webhook signature so only genuine events count, then posts to Slack with the customer, amount and the decline reason, such as card_declined or insufficient_funds. Your team sees what failed and why within seconds of it happening.
It is a good fit for SaaS teams that want a human to step in on larger accounts while automatic retries handle the rest.
What you get out of it
High-value customers get a personal touch
A failed 2,400 dollar annual renewal deserves a phone call, not just an automated email. The alert lets your team reach out immediately instead of waiting for retries to run out.
Decline reasons guide the right response
An expired card needs an update link, insufficient funds may resolve on payday, and a suspected fraud decline needs care. Seeing the reason in the message means the first reply is the correct one.
Revenue is protected from silent leaks
Involuntary churn from failed payments often outweighs voluntary cancellations. Seeing failures as they occur gives you a chance to rescue subscriptions before access is cut off. That keeps card problems from turning quietly into lost subscriptions on your biggest accounts.
Checkout bugs surface fast
Ten failures in an hour with the same error code usually point to a technical issue rather than customers. A noisy channel is an early sign that something is wrong in your integration.
Signature checking keeps the feed trustworthy
Only events that pass Stripe's signature verification produce a message, so a forged request cannot spam the channel or create false alarms for your team. Your team can trust that every message reflects something real that happened in Stripe.
How it works
What happens, step by step
The moment a charge or invoice payment fails in Stripe, ClickRuntime is told about it.
It checks that the message really came from Stripe before doing anything.
It posts an alert to your Slack channel with the customer, amount and the reason the payment failed.
Before it runs live
- Connect Stripe
- 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 Stripe steps into one automation
Under the hood
The code that runs this automation
import stripe
from clickruntime import on_event, credentials, notify, verify
@on_event
def handle(event):
if not verify.stripe(event.body, event.header("Stripe-Signature"), credentials.secret("STRIPE_WEBHOOK_SECRET")):
return {"ignored": "bad signature"}
obj = event.json["data"]["object"]
stripe.api_key = credentials.secret("STRIPE_API_KEY")
customer = stripe.Customer.retrieve(obj["customer"]) if obj.get("customer") else {}
if event.json["type"] == "invoice.payment_failed":
amount, reason = obj["amount_due"], (obj.get("last_finalization_error") or {}).get("message") or "card declined"
else:
amount, reason = obj["amount"], (obj.get("last_payment_error") or {}).get("message") or "unknown"
notify.slack(f":warning: Payment failed: {customer.get('name') or customer.get('email') or 'unknown customer'} · "
f"{amount / 100:,.2f} {obj['currency'].upper()} · {reason}", channel="#billing")
return {"type": event.json["type"]}FAQ
Common questions
Does it alert on every retry, or only the first failure?
Which Stripe permissions or webhook setup are needed?
Can I post only failures above a certain amount?
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
Hear when a customer cancels
When a subscription is cancelled, you get the customer and plan straight away.
See how it worksGet a message for every new sale
Each successful payment reaches you with the customer, amount and what they bought.
See how it worksNever miss a dispute deadline
You hear about each new dispute with its evidence due date, and get a reminder 3 days before it's due.
See how it worksKeep exploring
Set up “Get alerted when a payment fails” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.