Monitor Stripe subscriptions in real time

Monitor Stripe subscriptions in real time

Keeping track of your SaaS revenue in real-time is crucial. In this tutorial, we’ll show you how to connect Stripe to AlertHub to receive instant notifications on your phone (via Telegram or App) whenever a user changes their subscription plan.

The Challenge

Stripe Webhooks are powerful but usually require setting up a server to receive, parse, and forward the events. If you just want to know when a big enterprise plan lands, you don’t want to maintain a separate microservice for that.

The Solution: AlertHub Placeholders

AlertHub’s ingestion API supports Mustache-style placeholders. This allows you to construct a smart URL that extracts data directly from the Stripe payload.

Step 1: Subscribe to the Event

In your Stripe Dashboard:

  1. Create a new Webhook Endpoint.
  2. Select the event customer.subscription.updated.

Step 2: Create the Magic URL

We want the alert to tell us Who changed the plan and What plan they moved to. Note that Stripe sends amounts in cents.

Use this URL structure:

Generate Webhook URL
GET POST
https://api.thealerthub.com/sendAlert?ah_key=YOUR_KEY&ah_source=Stripe&ah_title=Subscription+Update&ah_description=Customer+%7B%7Bdata.object.customer%7D%7D+is+now+on+status+%7B%7Bdata.object.status%7D%7D+with+plan+%7B%7Bdata.object.plan.nickname%7D%7D

Step 3: Connect Destinations

Configure your destinations in AlertHub. Check Destinations for more information.

Result

Now, whenever a subscription changes, your phone will buzz:

Subscription Update Customer cus_Kj9… is now on status active with plan Pro Monthly

No code required!