AutomationFlowsEmail & Gmail › Payment Processing - Stripe Webhooks

Payment Processing - Stripe Webhooks

Payment Processing - Stripe Webhooks. Uses emailSend, supabase, mailchimp. Webhook trigger; 7 nodes.

Webhook trigger★★☆☆☆ complexity7 nodesEmail SendSupabaseMailchimp
Email & Gmail Trigger: Webhook Nodes: 7 Complexity: ★★☆☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Payment Processing - Stripe Webhooks",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "stripe-webhook",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "stripe-webhook",
      "name": "Stripe Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"type\"]}}",
              "operation": "equals",
              "value2": "checkout.session.completed"
            }
          ]
        }
      },
      "id": "check-event-type",
      "name": "Check Event Type",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "operation": "send",
        "fromEmail": "billing@rohimayapublishing.com",
        "toEmail": "={{$json[\"data\"][\"object\"][\"customer_email\"]}}",
        "subject": "\ud83c\udf89 Payment Confirmed - Welcome to Rohimaya Pro!",
        "emailType": "html",
        "message": "=<h1>Thank You for Your Purchase!</h1>\n<p>Your payment of ${{$json[\"data\"][\"object\"][\"amount_total\"] / 100}} has been processed successfully.</p>\n<h2>What's Next?</h2>\n<ul>\n<li>Your Pro features are now unlocked</li>\n<li>Access unlimited AI generations</li>\n<li>Generate audiobooks and covers</li>\n<li>Priority support included</li>\n</ul>\n<p><a href=\"https://rohimayapublishing.com/dashboard\">Go to Dashboard \u2192</a></p>\n<p>Invoice attached.</p>"
      },
      "id": "send-invoice-email",
      "name": "Send Invoice Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2,
      "position": [
        650,
        200
      ]
    },
    {
      "parameters": {
        "resource": "database",
        "operation": "update",
        "table": "users",
        "filterType": "string",
        "filterString": "email=eq.{{$json[\"data\"][\"object\"][\"customer_email\"]}}",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "subscription_tier": "={{$json[\"data\"][\"object\"][\"metadata\"][\"tier\"]}}",
            "subscription_status": "active",
            "stripe_customer_id": "={{$json[\"data\"][\"object\"][\"customer\"]}}",
            "subscription_started_at": "={{$now}}"
          }
        }
      },
      "id": "unlock-features",
      "name": "Unlock Pro Features",
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "listId": "premium-users",
        "email": "={{$json[\"data\"][\"object\"][\"customer_email\"]}}",
        "mergeFields": {
          "TIER": "={{$json[\"data\"][\"object\"][\"metadata\"][\"tier\"]}}",
          "PURCHASED": "={{$now.toFormat('yyyy-MM-dd')}}"
        }
      },
      "id": "segment-premium",
      "name": "Add to Premium Segment",
      "type": "n8n-nodes-base.mailchimp",
      "typeVersion": 1,
      "position": [
        650,
        400
      ]
    },
    {
      "parameters": {
        "resource": "database",
        "operation": "insert",
        "table": "transactions",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "stripe_payment_id": "={{$json[\"data\"][\"object\"][\"payment_intent\"]}}",
            "user_email": "={{$json[\"data\"][\"object\"][\"customer_email\"]}}",
            "amount": "={{$json[\"data\"][\"object\"][\"amount_total\"]}}",
            "currency": "={{$json[\"data\"][\"object\"][\"currency\"]}}",
            "tier": "={{$json[\"data\"][\"object\"][\"metadata\"][\"tier\"]}}",
            "status": "completed",
            "created_at": "={{$now}}"
          }
        }
      },
      "id": "track-revenue",
      "name": "Track Revenue in Analytics",
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        650,
        500
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={\"received\": true}"
      },
      "id": "acknowledge-webhook",
      "name": "Acknowledge Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    }
  ],
  "connections": {
    "Stripe Webhook": {
      "main": [
        [
          {
            "node": "Check Event Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Event Type": {
      "main": [
        [
          {
            "node": "Send Invoice Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Unlock Pro Features",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add to Premium Segment",
            "type": "main",
            "index": 0
          },
          {
            "node": "Track Revenue in Analytics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unlock Pro Features": {
      "main": [
        [
          {
            "node": "Acknowledge Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "all"
  },
  "versionId": "1",
  "tags": [
    "payment",
    "stripe",
    "subscription"
  ]
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Payment Processing - Stripe Webhooks. Uses emailSend, supabase, mailchimp. Webhook trigger; 7 nodes.

Source: https://github.com/HPagade/rohimaya-publishing-website/blob/6c48414f8c89927c74fa7fa7d5c6893653aa5f34/n8n-workflows/payment-processing.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

User Onboarding - Rohimaya Publishing. Uses emailSend, supabase, mailchimp, n8n. Webhook trigger; 6 nodes.

Email Send, Supabase, Mailchimp +1
Email & Gmail

Flow. Uses mongoDb, stripe, intercom, mailchimp. Webhook trigger; 10 nodes.

MongoDB, Stripe, Intercom +3
Email & Gmail

Jane Riveros — Flujo 09 · Tu lista de correo, en serio. Uses httpRequest, mailchimp. Webhook trigger; 6 nodes.

HTTP Request, Mailchimp
Email & Gmail

Flow. Uses mailchimp, airtable, slack. Webhook trigger; 5 nodes.

Mailchimp, Airtable, Slack
Email & Gmail

Code. Uses googleSheets, gmail, supabase, stickyNote. Webhook trigger; 51 nodes.

Google Sheets, Gmail, Supabase +1