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: 7 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

    Ran 3 actions twice on a retry

    1 email(s) and 1 payment action(s) ran again on the second delivery. In production that means duplicate emails, charges, or messages for the same event.

    Fix → Before you send email or charge a card, store the order/message id. If that id was already handled, skip. Put a short queue in front of bursts so one webhook storm cannot spam.

Run this pattern on your workflow

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