Back to list
dev_to 2026年3月21日

n8n を使って Stripe 決済通知を即座に取得する方法(無料テンプレート)

How to Get Instant Stripe Payment Notifications with n8n (Free Template)

Translated: 2026/3/21 3:08:14
stripen8nwebhooksslackautomation

Japanese Translation

私は一日にストライプ・ダッシュボードを 10 回以上確認して、決済が反映されたか見ていました。 一年に約 80 時間のダッシュボード見つめ作業でした。そのため、n8n を使って自動化しました。今では、誰かが支払った瞬間に即座に Slack 通知が届きます。 その仕組みと、末尾にある無料テンプレートを入手する方法はこちらです。 ストライプを通じて決済を行う場合、誰もが知っています: ストライプ・ダッシュボードをリフレッシュして、決済が反映されたか確認する ストライプの受領証のための電子メールを確認する チームに「その顧客が実際に支払ったのか?」と聞く ストライプのダッシュボードには本物のリアルタイムプッシュ通知は内蔵されていません。手動で polling(巡回)するか、自分で webhooks を設定する必要があります。 私は単純な n8n ワークフローを構築し、Stripe webhook イベントをキャッチして、リアルタイムでフォーマットされた Slack 通知を送信します。全体セットアップは約 5 ヶ月(5 分)です。 フローは以下の通りです: Stripe トリガー → イベント検証 → 決済フォーマット → Slack 通知 n8n は webhook URL を生成します。ストライプをその URL へ決済_intent.succeeded イベントを送信するように設定します。誰かが支払うたびに、ストライプはイベントをワークフローに自動的にプッシュします。 polling も cron job もなし。即座に。 ストライプ webhooks は、特に再送の時に、時に不正なイベントを送信することがあります。このノードは以下を検証します: イベントに有効な type フィールドがあるか? data.object が存在するか? 決済に amount フィールドがあるか? どのチェックも失敗した場合は、イベントがあなたの Slack チャンネルに到達する前に拒否されます。これにより、暗号化されたエラーが通知を混乱させることが防げます。 const event = $input.item.json; if (!event.type) { const obj = event.data.object; return { json: event }; このノードは、元のストライプイベントから重要な詳細を抽出し、それを清潔で読みやすいメッセージにフォーマットします。 const event = $input.item.json; const amount = ((obj.amount_received || obj.amount || 0) / 100); return { フォーマットされたメッセージは、あなたの #payments Slack チャンネルに投稿されます。あなたのチーム全員が即座に見ることができます—デスクトップ、モバイル、どこでも。 もう「あの決済は通ったのか?」というメッセージはありません。 n8n インスタンス—自己ホスティング(無料)または n8n Cloud Stripe Secret Key—Stripe ダッシュボード API キーから Slack Bot Token—chat:write 権限付き Slack API Apps から n8n にワークフロー JSON をインポート(ワークフロー → ファイルからインポート) Stripe Trigger ノードに Stripe Secret Key を追加 Slack ノードに Slack Bot Token を追加 Slack に #payments チャンネルを作成し、ボットを招待 ワークフローを有効化 Stripe テストモード(sk_test_...)でテスト 完全なワークフロー JSON は GitHub にあります—n8n インスタンスに直接インポートしてください: Stripe Payment Notifier—無料 n8n テンプレート 無料テンプレートは、Slack に決済 succeeded 通知を送るのをカバーします。また、以下の機能を追加する完全版も構築しています: サブスクリプション作成通知 失敗したチャージ通知 すべてのイベントの Google スプレッドシートへのログ記録 Gmail 電子メール通知 Switch ノードを使用したスマートなイベントルーティング エラーハンドリングと自動再送 完全な決済監視システムが必要であれば、完全版は Gumroad で利用可能です。 これを使用して数か月後: ゼロの欠落した決済—次日の何らかに比べて ダッシュボードチェックの年間約 80 時間の節約 誰かが聞くことなくチームが情報を把握する セットアップしてからワークフローに手を触れず 構築やカスタマイズについて質問やサポートが必要な場合は、コメントを投げていただければ幸いです。

Original Content

I was checking my Stripe dashboard 10+ times a day just to see if payments came through. That's roughly 80 hours a year staring at a dashboard. So I automated it with n8n — now I get an instant Slack notification every time someone pays. Here's exactly how it works, and you can grab the free template at the end. If you process payments through Stripe, you know the drill: Refresh the Stripe dashboard to check if a payment landed Check email for Stripe receipts Ask your team "did that customer actually pay?" There's no real-time push notification built into Stripe's dashboard. You either poll it manually or set up webhooks yourself. I built a simple n8n workflow that catches Stripe webhook events and sends formatted Slack notifications in real-time. The entire setup takes about 5 minutes. Here's the flow: Stripe Trigger → Validate Event → Format Payment → Slack Notification n8n generates a webhook URL. You configure Stripe to send payment_intent.succeeded events to that URL. Every time someone pays, Stripe pushes the event to your workflow automatically. No polling. No cron jobs. Instant. Stripe webhooks can occasionally send malformed events, especially during retries. This node checks: Does the event have a valid type field? Is data.object present? Does the payment have an amount field? If any check fails, the event is rejected before it reaches your Slack channel. This prevents cryptic errors from cluttering your notifications. const event = $input.item.json; if (!event.type) { const obj = event.data.object; return { json: event }; This node extracts the important details from the raw Stripe event and formats them into a clean, readable message: const event = $input.item.json; const amount = ((obj.amount_received || obj.amount || 0) / 100); return { The formatted message gets posted to your #payments Slack channel. Your whole team sees it instantly — on desktop, mobile, wherever. No more "hey, did that payment go through?" messages. n8n instance — self-hosted (free) or n8n Cloud Stripe Secret Key — from Stripe Dashboard API Keys Slack Bot Token — from Slack API Apps with chat:write permission Import the workflow JSON into n8n (Workflows → Import from File) Add your Stripe Secret Key to the Stripe Trigger node Add your Slack Bot Token to the Slack node Create a #payments channel in Slack and invite the bot Activate the workflow Test with Stripe test mode (sk_test_...) The complete workflow JSON is on GitHub — import it directly into your n8n instance: Stripe Payment Notifier — Free n8n Template The free template covers payment succeeded alerts to Slack. I also built a full version that adds: Subscription created alerts Failed charge alerts Google Sheets logging for all events Gmail email notifications Smart event routing with Switch node Error handling with automatic retries If you need the complete payment monitoring system, the full version is available on my Gumroad. After using this for a few months: Zero missed payments — vs. catching some the next day before ~80 hours/year saved on dashboard checking Team stays informed without anyone asking Haven't touched the workflow since setting it up If you have questions about the setup or want to customize it for your use case, drop a comment — happy to help.