Hourly
Get warned when payments look unusual
You're told when today's payments drop sharply or refunds spike compared with a normal day.
- Runs
- Hourly
- Apps
- Stripe
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: every hour, compare today's Stripe charges and refunds with my usual levels for that day of the week, and email me if payments drop by half or refunds double.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A checkout bug appears after a deploy on a Saturday. Payments quietly drop to a third of the normal rate, and nobody notices until Monday because nothing is technically broken: no errors, no alarms, just fewer orders. The opposite also happens, with a burst of refunds from a product defect or a card-testing attack that floods Stripe with small charges within minutes.
Every hour, ClickRuntime counts today's charges and refunds so far, compares them with the average for the same day of the week stored from previous runs and sends an alert when the figures deviate beyond the threshold you set. Quiet hours still count as normal when your business has quiet periods, because the comparison is against the same day.
It suits shops and SaaS teams that cannot watch Stripe all day but cannot afford a silent outage either.
What you get out of it
Silent checkout failures are caught within hours
A problem that produces no error message shows up as a number that is too low. An hourly check finds it on Saturday afternoon, not Monday, which can save an entire weekend of lost sales.
Fraud and card testing surface quickly
Card testers fire a lot of small charges in a short time, which pushes the count well above normal. An alert gives you time to enable Stripe Radar rules or block the source before fees and disputes pile up.
Refund waves are noticed while they can be stopped
A sudden rise in refunds usually points to a product, shipping or billing problem. Seeing it the same afternoon lets you pause promotions or fix the cause before many more customers are affected.
Comparing to the same weekday avoids false alarms
A Sunday is not a Tuesday. Because the baseline is the average for the same day of the week, normal weekend dips do not trigger alerts, so the ones you do get deserve attention.
You gain a record of unusual days
Each alert notes what was normal and what happened, which gives you a history of incidents. When you review reliability or explain a revenue dip to stakeholders, the evidence is already there.
How it works
What happens, step by step
Every hour, the automation counts today's Stripe charges and refunds so far.
It compares them with what is normal for this day of the week and time of day, based on earlier weeks.
If payments drop sharply or refunds spike, you get an email, such as "charges 11 vs usual 26 by 2pm on a Tuesday".
Before it runs live
- Connect Stripe
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
- Run it at a different time, more or less often, or only on weekdays
- 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
from datetime import datetime, timezone
import stripe
from clickruntime import on_trigger, credentials, state, notify
@on_trigger
def run(event):
stripe.api_key = credentials.secret("STRIPE_API_KEY")
now = datetime.now(timezone.utc)
start = int(now.replace(hour=0, minute=0, second=0, microsecond=0).timestamp())
charges = sum(1 for c in stripe.Charge.list(created={"gte": start}, limit=100).auto_paging_iter() if c.paid)
refunds = sum(1 for _ in stripe.Refund.list(created={"gte": start}, limit=100).auto_paging_iter())
key = f"{now:%a}-{now.hour}" # usual counts by this hour on this weekday
usual = state.get("usual") or {}
base = usual.get(key)
alerts = []
if base and base["charges"] >= 4 and charges < base["charges"] / 2:
alerts.append(f"charges {charges} vs usual {base['charges']:.0f}")
if base and refunds >= 2 and refunds > base["refunds"] * 2:
alerts.append(f"refunds {refunds} vs usual {base['refunds']:.0f}")
if alerts and state.get("alerted_day") != now.date().isoformat():
notify.email_me("Unusual Stripe activity today", "\n".join(alerts))
state.set("alerted_day", now.date().isoformat())
usual[key] = {"charges": charges if not base else base["charges"] * 0.75 + charges * 0.25,
"refunds": refunds if not base else base["refunds"] * 0.75 + refunds * 0.25}
state.set("usual", usual)
return {"charges": charges, "refunds": refunds, "alerts": alerts}FAQ
Common questions
How does it decide that something is unusual?
Will it send alerts overnight or during quiet hours?
What does the alert message contain?
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
Get yesterday's revenue every morning
Each morning you see yesterday's charges, refunds and new subscriptions in one message.
See how it worksGet a monthly revenue report
On the 1st you get last month's gross, refunds, net and new vs cancelled subscriptions, compared with the month before.
See how it worksSee overdue invoices every week
Each Monday you get open invoices past their due date, oldest first.
See how it worksKeep exploring
Set up “Get warned when payments look unusual” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.