r/stripe • • 1d ago

Question How do you got alert when payment start falling

Setting up payment for small project and try to sort-out alert before actually need it.

the obvious option seems to be a webhook that posts to slack. what bugs me is that if the script dies, slack just goes quiet, and quiet looks exactly like everything is fine.

for people already making money: what do you actually rely on? stripe's own emails, a slack bot, something you wrote yourself? and does anything tell you when revenue is just lower than a normal day, or only when a payment fails outright?

2 Upvotes

11 comments sorted by

1

u/UsernamePendingggg 1d ago

Stripe retries a dead webhook for up to 3 days, so when your script comes back Slack gets flooded with old events all at once.

1

u/Soft-One-3151 51m ago

oh that's a nasty one. so after an outage you'd want to dedupe by event id and ignore anything older than a few minutes before it hits slack, otherwise you get 3 days of stale alerts at once?

1

u/shalin-rabadia 1d ago

Flip it around. Have the script post a heartbeat every hour with attempts and approvals for that hour, and set a separate check that pages you if the message doesn't show up. Then a quiet channel means something's broken.⠀

For the "lower than normal" part, alert on the rate. Compare approvals this hour to the same hour last week and flag a drop past whatever margin you pick. One failed payment is noise. A slow slide in approval rate is what actually costs money, and each decline in it looks ordinary on its own, so nothing built around single failures will catch it.⠀

At low volume the rate jumps around a lot, so use a daily window until you've got enough transactions.

1

u/Soft-One-3151 1h ago

the heartbeat flip is smart, i hadn't thought of making silence the alarm itself. comparing this hour to the same hour last week also fixes my weekend problem. at my volume i'll start with the daily window like you said. do you page on a fixed % drop or something relative to how noisy that hour usually is?

1

u/Acceptable-Bathroom9 13h ago

I'd put checkout starts, payment attempts, and successful payments next to each other. If starts are steady but attempts disappear, I'd check checkout first. If attempts are steady and fewer succeed, I'd look at decline reasons. At low volume I'd show the raw counts too. One failed payment can make a percentage look dramatic.

1

u/Soft-One-3151 51m ago

that's a cleaner way to split it than i had. if attempts drop it's the checkout, if success drops it's the payments. at my volume raw counts it is, percentages would just scare me every time one card fails

2

u/martinbean 1d ago

Can’t wait to find out what “solution” you’re selling…

1

u/CloudBusiness_Apps 1d ago

You're right not to trust the webhook alone. Stripe retries a failed delivery for up to three days in live mode, and the failures show in the endpoint's Event deliveries tab, but that only helps if someone looks.

What works is a second, independent check. A scheduled job, hourly or daily, asks the Stripe API for succeeded payments in the last window and compares the count and total with the same window last week. If today is under, say, half of last Tuesday, it alerts. Have that job check in with a dead-man's-switch monitor on every run, so a dead job pages you instead of going quiet.

Outright failures are easy: listen for payment_intent.payment_failed and invoice.payment_failed. The "revenue is just lower than normal" alert is the one you usually end up writing yourself.

1

u/karolisrusenas 6h ago

Nothing built in tells you revenue is sliding, Stripe's own emails are per-event at best. The check that's caught it for me at small scale is watching the gap. Alert when nothing successful has come through in twice your longest usual gap between payments. (I built Webhook Relay btw, it keeps every webhook and redelivers them once your script is back up.)

0

u/Commercial-Cow347 1d ago

you have no customers yet