Finance & Ops · n8n

Instantly Alert Your Team on Slack When a Stripe Payment Fails

Automatically sends a Slack message to your team channel the moment a Stripe payment fails, giving you real-time visibility into revenue loss. No more manually checking Stripe dashboards — your team gets alerted instantly so you can follow up fast.

difficulty Beginnersetup 20 minresult Every failed Stripe payment triggers an immediate, formatted Slack alert with the customer name, amount, and failure reason so your team can act within minutes.
  1. 1

    Set up the Stripe Webhook Trigger

    Add a Webhook node as your trigger. Set the HTTP Method to POST and copy the generated webhook URL. In your Stripe Dashboard go to Developers > Webhooks, click Add Endpoint, paste the URL, and select the event payment_intent.payment_failed. This node will receive the raw event data every time a payment fails.

  2. 2

    Extract the Key Payment Details

    Add a Set node connected to the Webhook. Create three fields: set customerEmail to {{$json.body.data.object.last_payment_error.payment_method.billing_details.email}}, set amountFailed to {{$json.body.data.object.amount / 100}}, and set failureReason to {{$json.body.data.object.last_payment_error.message}}. This makes the data clean and easy to reference in the next step.

  3. 3

    Send the Slack Alert

    Add a Slack node connected to the Set node. In the node credentials, connect your Slack OAuth app or use a Slack Incoming Webhook URL. Set the operation to Post Message, choose your channel (e.g. #payments-alerts), and set the message text to something like: Payment Failed! Customer: {{$json.customerEmail}} Amount: ${{$json.amountFailed}} Reason: {{$json.failureReason}}. Your team will see this alert immediately.

Frequently asked questions

What if the customer email is missing from the Stripe payload?

Not every Stripe event includes billing email in the same path. If the field is blank, you can also use `{{$json.body.data.object.last_payment_error.payment_method.id}}` to capture the payment method ID and look it up manually in Stripe. Alternatively, store customer email in Stripe's customer object and reference `{{$json.body.data.object.customer}}` to fetch it with an extra HTTP Request node.

Can I send the alert to multiple Slack channels or people?

Yes. Duplicate the Slack node and point each copy to a different channel or use a comma-separated list if your Slack app supports it. You could also send a direct message to a specific person by using their Slack member ID as the channel value.

Will this workflow catch every type of Stripe payment failure?

This recipe listens to the `payment_intent.payment_failed` event, which covers the majority of card declines and bank failures. If you also use Stripe Subscriptions, add the `invoice.payment_failed` event to the same webhook endpoint in Stripe and the workflow will handle both automatically.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.