Trigger Notification Workflows on Stripe Events
Build automated notification sequences for Stripe events. Handle payments, subscriptions, invoices, and trials with zero code.
{
"key": "integration.stripe.charge.succeeded",
"steps": [
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "{{data.customer.id}}"}],
"content": {
"title": "Payment Received",
"body": "Thank you! We received your payment of ${{data.amount}} USD."
}
}
},
{
"command": "wait",
"input": {"duration": 3600}
},
{
"command": "broadcast",
"if": "{{data.metadata.plan}} == 'premium'",
"input": {
"recipients": [{"external_id": "sales-team"}],
"content": {
"title": "New Premium Customer!",
"body": "Customer {{data.customer.id}} just upgraded to premium with a payment of ${{data.amount}}."
}
}
}
]
}Trusted by 1,000+ companies
Why Stripe + MagicBell Workflows
Respond to every Stripe event with the right notification at the right time.
Instant Triggers
Workflows execute automatically when Stripe webhooks arrive. No polling, no delays.
Event Data Access
Reference any Stripe webhook data in your notifications with liquid templates.
Smart Logic
Branch workflows based on plan type, amount, customer properties, or metadata.
Time Delays
Wait hours or days between notifications for dunning sequences and trial reminders.
Multi-Channel
Send to in-app, email, Slack, SMS, or push notifications from a single workflow.
Zero Code Setup
Configure workflows via API or dashboard. No backend changes required.
Stripe Event Automation Examples
Real-world workflows for payments, subscriptions, and billing.
charge.succeededPayment Confirmation Flow
When a payment succeeds, send immediate confirmation to customer, wait 1 hour, then notify sales team about new premium upgrades.
{
"key": "integration.stripe.charge.succeeded",
"steps": [
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "{{data.customer.id}}"}],
"content": {
"title": "Payment Received",
"body": "Thank you! We received your payment of ${{data.amount}} USD."
}
}
},
{
"command": "wait",
"input": {"duration": 3600}
},
{
"command": "broadcast",
"if": "{{data.metadata.plan}} == 'premium'",
"input": {
"recipients": [{"external_id": "sales-team"}],
"content": {
"title": "New Premium Customer!",
"body": "Customer {{data.customer.id}} just upgraded to premium with a payment of ${{data.amount}}."
}
}
}
]
}customer.subscription.createdNew Subscription Welcome
Welcome new subscribers with instant confirmation, then alert sales team about MRR increase.
{
"key": "integration.stripe.customer.subscription.created",
"steps": [
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "{{data.customer}}"}],
"content": {
"title": "Welcome to {{data.plan.nickname}}!",
"body": "Your subscription is now active."
}
}
},
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "sales-team"}],
"content": {
"title": "New Subscription Created",
"body": "Customer {{data.customer}} subscribed to {{data.plan.nickname}}. MRR increased!"
}
}
}
]
}invoice.payment_failedPayment Failure Dunning
Alert customer immediately when payment fails, wait 48 hours, then escalate to billing team for manual intervention if unresolved.
{
"key": "integration.stripe.invoice.payment_failed",
"steps": [
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "{{data.customer}}"}],
"content": {
"title": "Payment Failed",
"body": "We couldn't process your payment of ${{data.amount_due}}. Please update your billing info to avoid service interruption.",
"action_url": "/billing"
}
}
},
{
"command": "wait",
"input": {"duration": 172800}
},
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "billing-team"}],
"content": {
"title": "Urgent: Payment Failed",
"body": "Customer {{data.customer}} payment failed 48hrs ago. Amount: ${{data.amount_due}}. Manual intervention needed."
}
}
}
]
}customer.subscription.trial_will_endTrial Ending Sequence
Nurture trial users with a 3-day drip campaign, then alert sales team on expiration day for conversion follow-up.
{
"key": "integration.stripe.customer.subscription.trial_will_end",
"steps": [
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "{{data.customer}}"}],
"content": {
"title": "Trial Ending Soon",
"body": "Your trial ends in 3 days. Subscribe to continue using premium features.",
"action_url": "/subscribe"
}
}
},
{
"command": "wait",
"input": {"duration": 86400}
},
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "{{data.customer}}"}],
"content": {
"title": "2 Days Left in Your Trial",
"body": "Don't lose access! Subscribe now to keep all premium features."
}
}
},
{
"command": "wait",
"input": {"duration": 86400}
},
{
"command": "broadcast",
"input": {
"recipients": [{"external_id": "sales-team"}],
"content": {
"title": "Trial Expiring Today",
"body": "Customer {{data.customer}} trial ends today. No conversion yet - follow up opportunity!"
}
}
}
]
}Connect Stripe to MagicBell
Forward Stripe webhooks to MagicBell to automatically trigger workflows.
How It Works
integration.stripe.charge.succeededhttps://api.magicbell.com/webhooks/stripe?project_id=YOUR_IDcharge.succeeded, invoice.payment_failed, etc.Event data available as {{data.*}} variables# 1. Get your MagicBell webhook URL
WEBHOOK_URL="https://api.magicbell.com/webhooks/stripe?project_id=YOUR_PROJECT_ID"
# 2. Create webhook in Stripe
curl https://api.stripe.com/v1/webhook_endpoints \
-u sk_test_YOUR_STRIPE_KEY: \
-d "url=$WEBHOOK_URL" \
-d "enabled_events[]=charge.succeeded" \
-d "enabled_events[]=customer.subscription.created" \
-d "enabled_events[]=invoice.payment_failed"Supported Stripe Events
All Stripe webhook events are supported. Here are the most common ones for notifications.
Payment Events
charge.succeeded - Payment completedcharge.failed - Payment failedcharge.refunded - Payment refundedpayment_intent.succeeded - Payment confirmedSubscription Events
customer.subscription.created - New subscriptioncustomer.subscription.updated - Subscription changedcustomer.subscription.deleted - Subscription canceledcustomer.subscription.trial_will_end - Trial ending soonInvoice Events
invoice.payment_succeeded - Invoice paidinvoice.payment_failed - Invoice payment failedinvoice.upcoming - Invoice due sooninvoice.finalized - Invoice readyCustomer Events
customer.created - New customercustomer.updated - Customer info changedcustomer.deleted - Customer removedcustomer.source.created - Payment method addedTo create a workflow for a Stripe event, use the key pattern: integration.stripe.{event_name}. For example: integration.stripe.charge.succeeded
Explore More Workflows
Learn about workflow fundamentals, commands, and integrations with other platforms.
View All Workflow Features