DEV Community

Romain Rabreau
Romain Rabreau

Posted on

My AI agent monitors Stripe and texts me when I make money in my sleep

It was 2am when my phone buzzed.

Not an alarm. Not a message from a friend. A Telegram notification from an agent I built: "New Stripe payment: €14.99. Sleep well 💸"

I'd been asleep for two hours.

That was the moment I realized I'd fundamentally changed how I work.


How I got here

I'm Romain. Solo developer. I've been building web apps for years — the usual stack, the usual grind. Client work, feature requests, deadlines, the occasional 3am bug fix.

A year ago, I started obsessing over AI agents. Not the hype. The actual mechanics: how do you make an autonomous system that does real things — reads emails, monitors APIs, makes decisions, takes actions — without you in the loop?

I started small. A script that checked my inbox and summarized unread newsletters. Then a bot that watched my GitHub issues and drafted replies. Then something that monitored my Stripe dashboard and sent me daily revenue summaries.

Each one taught me something. Each one failed in interesting ways. Each one made the next one better.


The Stripe agent

Here's the one that changed my mind about what's possible.

I built an agent that:

  1. Listens for Stripe webhook events
  2. Parses payment data (amount, product, customer country)
  3. Sends a formatted Telegram message within seconds
  4. Logs everything to a simple dashboard
  5. Flags anomalies (refunds, disputes, unusual amounts)

Total build time: one weekend.
Lines of code: ~300.
Cost to run: essentially zero.

But the real value isn't the notification. It's what it represents: a system that works while you sleep, that doesn't get tired, that never misses an event.

I stopped checking Stripe obsessively. I stopped wondering "did that payment go through?" The agent handles it. I get the signal when it matters.


What I replaced

Let me be honest about what I was doing before agents:

  • Manual monitoring: I was checking dashboards 10-15 times a day. Stripe, analytics, error logs. Context-switching hell.
  • Repetitive responses: Same emails, same questions, same onboarding sequences. I'd write variations of the same thing over and over.
  • Delayed reactions: Something would break at night. I'd find out the next morning. By then, users had already churned.

Agents didn't replace my thinking. They replaced my watching. The boring vigilance work that drains you without producing anything.


The architecture that made it click

After a lot of trial and error, I settled on a pattern I now use for almost everything:

Trigger → Context → Decision → Action → Report
Enter fullscreen mode Exit fullscreen mode

Trigger: Something happens (webhook, schedule, user message, file change)
Context: Agent gathers relevant information
Decision: LLM or rule-based logic decides what to do
Action: Agent does the thing (send message, update DB, call API)
Report: Human gets notified of what happened

This pattern is stupidly simple. But getting the implementation right — error handling, rate limits, auth, persistence, cost control — that's where most people get stuck.


The tool I built around this

I got obsessed enough with agent infrastructure that I built OpenClaw — a platform for running and managing AI agents. It's the scaffolding I wished existed when I started.

I've been running it for my own projects for months. It handles the boring parts: agent scheduling, tool registration, channel routing (Telegram, Discord, email), memory, and more.

Recently I started teaching what I've learned. Not the theory — the actual patterns, the real failures, the architecture decisions that matter. I packaged everything into a practical course for developers who want to build agents that actually work in production, not just demos.

If you're tired of building toys that don't survive contact with reality, it might be worth checking out.


What I'd tell myself a year ago

Start with a real problem you have. Don't build a "general AI assistant." Build something that solves your specific annoying problem. The Stripe notifier worked because I genuinely hated checking Stripe manually.

Embrace the boring parts. Error handling, logging, rate limiting — this is where amateur agents die. Production agents are mostly plumbing.

Make it observable. If your agent does something wrong and you can't tell what or why, you'll never fix it. Log everything. Send yourself summaries. Make the invisible visible.

Small and reliable beats big and flaky. A 50-line agent that runs perfectly every time is worth 10x more than a complex agent that sometimes works.


The 2am buzz

I still get that notification sometimes. Agent detects a payment, fires a message, I see it the next morning.

It's a small thing. But it represents something bigger: a system that works whether I'm paying attention or not.

That's what I'm chasing. That's what I'm teaching. Bit by bit, building the infrastructure for a business that doesn't need me to be awake 24/7.

If you're building something similar — or trying to — I'd love to hear what you're working on. Drop a comment or come check out what I've put together.


I write about AI agents, solo dev life, and building in public. Follow if that's your thing.

Top comments (0)