Workflows / Stripe / radar.early.fraud.warning.created

Stripe Fraud Warning Notification to Slack & Email

Use the Stripe integration by MagicBell to setup a workflow when radar.early.fraud.warning.created triggers in Stripe.

Connect Stripe to MagicBell to receive events and trigger workflows. This guide uses the MagicBell CLI.

Add the Stripe integration

Save your Stripe webhook signing secret in MagicBell. See Stripe webhooks.

magicbell integration save_stripe \
  --data '{"webhook_signing_secret":"whsec_xxx"}'

Copy the ID from the response and use it to build your webhook URL:

https://api.magicbell.com/v2/integrations/stripe/webhooks/incoming/{id}

Setup the webhook

Add a workflow

Create a workflow that triggers automatically when Stripe sends this event.

Workflow key

Use this key to trigger the workflow when Stripe sends a radar.early.fraud.warning.created:

integration.stripe.radar.early_fraud_warning.created

Example workflow

Notify the fraud team immediately when Stripe Radar detects potential fraud.

{
  "key": "integration.stripe.radar.early_fraud_warning.created",
  "steps": [
    {
      "command": "broadcast",
      "input": {
        "content": "Stripe Radar detected potential fraud. Type: {{payload.data.object.fraud_type}}. Charge ID: {{payload.data.object.charge}}. Immediate review required.",
        "overrides": {
          "providers": {
            "email": {},
            "slack": {}
          }
        },
        "recipients": [
          {
            "external_id": "fraud-team"
          }
        ],
        "title": "🚨 Fraud warning"
      }
    }
  ]
}

Save with the CLI

Use the MagicBell CLI to save this workflow to your project. You can also use the Workflows API endpoint instead.

magicbell workflow save \
  --data '{"key":"integration.stripe.radar.early_fraud_warning.created","steps":[{"command":"broadcast","input":{"content":"Stripe Radar detected potential fraud. Type: {{payload.data.object.fraud_type}}. Charge ID: {{payload.data.object.charge}}. Immediate review required.","overrides":{"providers":{"email":{},"slack":{}}},"recipients":[{"external_id":"fraud-team"}],"title":"🚨 Fraud warning"}}]}'

Event payload

Sample payload for the radar.early.fraud.warning.created event. Use liquid templates to access fields in your workflow.

{
  "api_version": "2023-10-16",
  "created": 1694109981,
  "data": {
    "object": {
      "actionable": true,
      "charge": "ch_1NqIpRLkdIwHu7ixNnX6Yz9a",
      "created": 1694109981,
      "fraud_type": "unauthorized_use_of_card",
      "id": "issfr_1NqIpRLkdIwHu7ixMmW5Xy8z",
      "livemode": false,
      "object": "radar.early_fraud_warning"
    }
  },
  "id": "evt_1NqIpSLkdIwHu7ixLlV4Wx7y",
  "livemode": false,
  "object": "event",
  "type": "radar.early_fraud_warning.created"
}
View all Stripe workflows →