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:
- Create a new Webhook Endpoint.
- 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:
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!