A man using a tablet at a white table with a cup of coffee, banner image on the Payment failure alerts page

Template - Automation starter - About 20 minutes

Payment failure alerts

Automation starter: verified webhook handling for failed charges

What ships inside

1

Verified webhook handling for failed charges

2

Alerts enriched with customer, amount, code and retry date

3

Severity routing: soft declines log, final failures page

4

A recovery-rate tracker to prove the flow pays

Install

Step 1

Verify the webhook signature check with a test event before trusting any alert.

Step 2

Route severities correctly; paging on soft declines trains people to ignore pages.

Step 3

Draft the customer email but review sends for the first dozen.

A worked example

A SaaS routes failed charges by severity. Sample events (example).

EventSeverityRoute
card_declined, retry in 3 daysSoftLogged only
insufficient_funds, retry in 3 daysSoftLogged, customer email draft
final failure, subscription cancelledFinalPage the owner
Webhook with bad signatureRejectedNever trusted

The numbers shown are examples. Swap in your own.

Done looks like

  • A test event proved the signature check
  • Alerts show customer, amount, code and retry date
  • Paging is only for final failures

Mistakes to avoid

  • Paging on soft declines
  • Not verifying the signature
  • Auto-sending emails before review

What it connects

Stripe · Slack

Each connector page describes what it does.

Get this template

Download the workflow definition (json) - the full trigger, steps and connector requirements as a workflow file, ready to import when Automate opens. Every step is readable on this page and in the linked playbook today.

Related playbook: Alert on failed payments

All templates

Questions about this template

How long does Payment failure alerts take to set up?

Plan for about 20 minutes for the first run. The install steps above are in order, and the worked example shows what a finished setup looks like with example data.

How does it work?

The workflow file will be importable when Automate opens. Every step is readable on this page and in the linked playbook, and the Slack, Stripe connector pages cover the services involved.

What should I do first?

Verify the webhook signature check with a test event before trusting any alert.

Other templates that use the same services: SaaS starter · Approval chain · Weekly research brief

The playbook behind this template

This template follows Alert on failed payments. The same steps, with the free tool that does each one.

Step 1 of 5

Connect the payment provider's failure webhook and verify the signature check with webhook-tester.

Use Webhook Tester. Build webhook payloads, sign them with HMAC, and get the exact curl command to fire them

Step 2 of 5

Enrich the alert with what the responder needs: customer email, amount, failure code, retry date.

Step 3 of 5

Route by severity: a retryable soft decline logs quietly, a final failure alerts a human.

Step 4 of 5

Draft the customer email from a template but keep sending manual until you have seen a dozen correct drafts.

Step 5 of 5

Track recovery rate monthly; the number pays for the automation.

Free tools you can use with it

These run in your browser with no account.

Webhook Tester

Compose the JSON, sign it like the real provider would, and copy the curl that fires it. Webhook integrations stop needing a staging deploy to test.

  • Payload composer. Write or paste the JSON body with live validation and pretty printing.
  • HMAC signing. Generate the X-Signature header the way Stripe, GitHub and Shopify do: HMAC-SHA256 of the raw body with your secret, computed locally.
  • Exact curl export. One tap copies the full curl command - headers, signature and body - ready for a terminal.
  • Header presets. Common provider header shapes (Stripe, GitHub, Shopify, Slack) prefill the signature format and event header names.

Real output from the tool

YOU ENTER:
Preset
github
Input
{"event":"user.created","data":{"id":"u_123","email":"new@customer.com"}}
Input
whsec_test_123
Input
https://localhost:3000/webhooks/provider

THE TOOL RETURNS:
curl -X POST 'https://localhost:3000/webhooks/provider' \
-H 'Content-Type: application/json' \
-H 'X-Hub-Signature-256: sha256=d2a7a1778ccddd6311aa21be3f1cb4bb29f1772b80bfdac1d57832f6e0e68734' \
--data-binary '{"event":"user.created","data":{"id":"u_123","email":"new@customer.com"}}'

Email Template Builder

Pick the email type, fill in the specifics, and get a complete template with subject line, preview text, body, and CTA - written to be read on a phone and answered.

  • Four proven types. Cold outreach, follow-up, announcement, and newsletter - each with its own structure.
  • Subject + preview text. The two lines that decide the open rate, generated with the body.
  • CTA discipline. One clear ask per email. The builder enforces it.
  • Copy-ready. Plain text that pastes cleanly into any email tool.

Real output from the tool

YOU ENTER:
Type
outreach
Your name / company
Sam, Acme
Recipient (name or role)
Jordan
The point (one sentence)
we cut onboarding time in half for support teams
The ask (the one thing you want)
a 15-minute call next week

THE TOOL RETURNS:
Subject: Quick question, Jordan
Preview: we cut onboarding time in half for support teams
Hi Jordan,
we cut onboarding time in half for support teams.
I thought this was relevant to you specifically. Worth a 15-minute call next week?
Either way, no follow-up spiral - one reply settles it.
Sam, Acme

Workflow Mapper

Name each step, say where it goes next - including yes and no targets for decisions - and get a validated flow graph as SVG. Unknown targets, unreachable steps, missing terminals and cycles are called out before you ship the map.

  • Explicit edges. Every step names its next step; decisions name both yes and no targets. Nothing is implied.
  • Validation first. Dead targets, unreachable nodes, missing terminals and cycles are listed as findings, with cycles shown as paths.
  • Ranked layout. Nodes lay out left to right by graph depth; back-edges route as connectors, not decoration.
  • SVG export. The validated graph exports as one standalone SVG for docs and wikis.

Real output from the tool

YOU ENTER:
Input
A: Ticket arrives -> B
B: Urgent? -> yes: C, no: D
C: Page on-call -> E
D: Queue for morning -> E
E: Resolved? -> yes: END, no: B

THE TOOL RETURNS:
yes
no
yes
no
Ticket arrives
A
Urgent?
B
Page on-call
C
Queue for morning
D
Resolved?
E

Services this template touches

Each connector page shows whether it is available yet.

Stripe

Uses:

  • Failed payments start a dunning playbook with a recovery email draft.
  • New subscriptions trigger the onboarding sequence.
  • Weekly revenue and churn metrics compile from balance events.

Until it ships, set this part up by hand in Stripe.

Slack

Uses:

  • Playbook approvals arrive as a Slack message with Approve / Reject buttons.
  • A keyword in a watched channel starts a run - 'urgent' pages the on-call playbook.
  • Daily summary of a channel posted back as a threaded digest.

Until it ships, set this part up by hand in Slack.

What is in the workflow file

The download is a workflow file. These are its fields.

Kindautomation-workflow
Statusdraft-definition
Connectorsstripe, slack
Linked playbookalert-on-failed-payments
Install steps3
Included parts4

More questions

Webhook Tester: Is my secret uploaded?

No. Signing happens in your browser with the Web Crypto API. The secret never leaves the tab.

Webhook Tester: Which algorithms?

HMAC-SHA256, hex and base64 output, with sha256= prefix styles for GitHub and Stripe formats.

Email Template Builder: Cold outreach included?

Yes - structured for relevance-first, short, one ask. The rest is your research.

Email Template Builder: Sequences?

Generate the outreach, then the follow-up type for touch two and three.

Workflow Mapper: Loops allowed?

Yes - real workflows loop. Cycles are detected and listed so they are deliberate, not accidental.

Workflow Mapper: Multiple terminals?

Fine - every node with no outgoing edge (or -> END) counts as a terminal.

A wooden desk with glasses, a coffee cup, a plant and the edge of a laptop, banner image on the Payment failure alerts page

Start from working, not from blank.

Each template lists what ships inside and the install steps.