Instant alert when a Stripe payment fails

Know about failed payments right away and log them for follow-up.

Easy Saves ~2 hours/month Finance & AdminBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Stripe — payment failed event
  1. Receive the failed payment event from Stripe.
  2. Post the customer email, amount and failure reason to Slack.
  3. Append the same details to a "Failed payments" sheet.

Diagram

SPayment failedStripe TriggerSAlert #billingSlack✎Pick fieldsEdit Fields (Set)GLog failed paymentGoogle Sheets
Trigger App Logic

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder.

Workflow JSON
Show code (162 lines)
{
  "name": "Instant alert when a Stripe payment fails (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## Instant alert when a Stripe payment fails\nKnow about failed payments right away and log them for follow-up.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "events": [
          "payment_intent.payment_failed"
        ]
      },
      "id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
      "name": "Payment failed",
      "type": "n8n-nodes-base.stripeTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "webhookId": "458223d5-1673-42cd-a93b-ba83e3101dc7"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#billing",
          "mode": "name"
        },
        "text": "=💳 Payment failed: {{ ($json.data.object.amount / 100).toFixed(2) }} {{ $json.data.object.currency.toUpperCase() }}\nCustomer: {{ $json.data.object.receipt_email || $json.data.object.customer }}\nReason: {{ $json.data.object.last_payment_error?.message }}",
        "otherOptions": {}
      },
      "id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
      "name": "Alert #billing",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "date",
              "value": "={{ $now.toISO() }}",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "customer",
              "value": "={{ $json.data.object.receipt_email || $json.data.object.customer }}",
              "type": "string"
            },
            {
              "id": "a3",
              "name": "amount",
              "value": "={{ $json.data.object.amount / 100 }}",
              "type": "number"
            },
            {
              "id": "a4",
              "name": "reason",
              "value": "={{ $json.data.object.last_payment_error?.message }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
      "name": "Pick fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        300,
        220
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Failed payments",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {}
        },
        "options": {}
      },
      "id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
      "name": "Log failed payment",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        600,
        0
      ]
    }
  ],
  "connections": {
    "Payment failed": {
      "main": [
        [
          {
            "node": "Alert #billing",
            "type": "main",
            "index": 0
          },
          {
            "node": "Pick fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pick fields": {
      "main": [
        [
          {
            "node": "Log failed payment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • Add a Gmail step to send the customer a friendly card-update reminder.

Related flows