Trigger Notification Workflows on Stripe Events

Build automated notification sequences for Stripe events. Handle payments, subscriptions, invoices, and trials with zero code.

Payment Success Workflow
{
  "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

StacksiGitBookPitchEllipsusWinampSifted
Stripe + MagicBell

Why Stripe + MagicBell Workflows

Respond to every Stripe event with the right notification at the right time.

Instant Triggers

Instant Triggers

Workflows execute automatically when Stripe webhooks arrive. No polling, no delays.

Event Data

Event Data Access

Reference any Stripe webhook data in your notifications with liquid templates.

Smart Logic

Smart Logic

Branch workflows based on plan type, amount, customer properties, or metadata.

Time Delays

Time Delays

Wait hours or days between notifications for dunning sequences and trial reminders.

Multi-Channel

Multi-Channel

Send to in-app, email, Slack, SMS, or push notifications from a single workflow.

Zero Code

Zero Code Setup

Configure workflows via API or dashboard. No backend changes required.

Common Workflows

Stripe Event Automation Examples

Real-world workflows for payments, subscriptions, and billing.

Stripe
charge.succeeded

Payment 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}}."
        }
      }
    }
  ]
}
Stripe
customer.subscription.created

New 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!"
        }
      }
    }
  ]
}
Stripe
invoice.payment_failed

Payment 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."
        }
      }
    }
  ]
}
Stripe
customer.subscription.trial_will_end

Trial 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!"
        }
      }
    }
  ]
}
Setup

Connect Stripe to MagicBell

Forward Stripe webhooks to MagicBell to automatically trigger workflows.

How It Works

1.
Create workflows in MagicBell with Stripe event keys
integration.stripe.charge.succeeded
2.
Configure Stripe webhook endpoint
https://api.magicbell.com/webhooks/stripe?project_id=YOUR_ID
3.
Select which events to forward
charge.succeeded, invoice.payment_failed, etc.
4.
Workflows execute automatically when events arrive
Event data available as {{data.*}} variables
Create Stripe Webhook
# 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"
Events

Supported Stripe Events

All Stripe webhook events are supported. Here are the most common ones for notifications.

Payment Events

charge.succeeded - Payment completed
charge.failed - Payment failed
charge.refunded - Payment refunded
payment_intent.succeeded - Payment confirmed

Subscription Events

customer.subscription.created - New subscription
customer.subscription.updated - Subscription changed
customer.subscription.deleted - Subscription canceled
customer.subscription.trial_will_end - Trial ending soon

Invoice Events

invoice.payment_succeeded - Invoice paid
invoice.payment_failed - Invoice payment failed
invoice.upcoming - Invoice due soon
invoice.finalized - Invoice ready

Customer Events

customer.created - New customer
customer.updated - Customer info changed
customer.deleted - Customer removed
customer.source.created - Payment method added
💡
Event Naming Convention

To 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