Field notes

Invoice webhook → email + charge

Classic money path. Retries and spam can double-send or double-charge.

#webhook#email#stripe

What Crash Labs saw

Gate FAIL · risk 100/100 · 3 outbound action(s) · coverage 100%.

"Invoice on payment webhook" should not go live yet: 6 critical issue(s) (score 100/100). Biggest risk: "Create Invoice" can fail with no backup path (Create Invoice).

Why this breaks in production

  • critical

    "Create Invoice" can fail with no backup path

    Money or invoices can stop mid-flight after earlier steps already ran - books and reality diverge.

    Fix → Turn on retry for transient SMTP/API errors, and route hard failures to an error branch that alerts someone.

  • critical

    "Create Invoice" retries can create duplicates

    Flaky networks turn into double emails, double Slack pings, or double charges.

    Fix → Before create/send: check "already processed?" using a unique event/message id. Prefer upserts over creates.

  • critical

    Webhook "Payment Webhook" can fire side effects twice

    Duplicate delivery can mean double charges or double customer emails.

    Fix → Store the provider event id; if you've seen it, skip every create/send node.

  • critical

    Retry survival: 3 side effect(s) still fire on delivery #2

    Retry survival: 1 payment · 1 email · 3 side effect(s) survived run 2.

    Fix → Add dedupe keys, idempotency, and rate limiting / a queue before outbound sends and Stripe writes.

Run this pattern on your workflow

Upload your n8n JSON at Crash Labs. Same gate, blast-radius ledger, and shareable report for clients.