Synthetic teaching example for a website delivery brief. Not a client result, live account test or certification.
A green webhook response is not a completed order
When commissioning a payment integration, ask the supplier to show a failure between accepting an event and completing its work. A list of event IDs in memory disappears on restart. Marking an event handled before a failed local operation can lose work; deduplicating event IDs alone can also miss two events that refer to one intended fulfilment.
The filled failure sequence
| Step | Input | Expected evidence |
|---|---|---|
| 1 | evt-A → fulfil-order-DEMO-1 | Inbox saved on disk |
| 2 | Fail within the local work transaction | Operation and done flag both rolled back |
| 3 | Close and reopen SQLite | evt-A remains pending |
| 4 | Process evt-A, then replay evt-A | One local operation |
| 5 | evt-B → same business operation | Two inbox rows, still one local operation |
The demonstration has separate unique keys for transport identity and business-operation identity. It also rejects the same event ID reused with a different operation rather than quietly discarding the conflict. Download the self-contained inbox demonstration and run node durable-inbox.mjs with Node 24+. SQLite is experimental in the tested Node runtime. It creates and removes only its own temporary directory.
Expected output is inboxRows 2, completedRows 2, localOperations 1 and rollbackAndReopenVerified true. Keep the output together with the agreed operation-key definition. Change that definition only through a reviewed business contract: subscription renewals and separate orders must not accidentally share one fulfilment key.
What this does not prove
The operation is a row in the same local database transaction, not a call to a warehouse, email service or payment API. An external side effect needs its own idempotency, outbox and recovery design. This is not an exactly-once guarantee, a production queue, a signature verifier or a Stripe endpoint. The supplier still needs to demonstrate durable acceptance before acknowledgement, concurrency, retries, dead-letter handling and reconciliation in an authorised environment.
Primary facts and limits
Stripe webhook guidance: Documents duplicate delivery and separate events concerning the same object; event ID alone is not every business key.
Sources reviewed 15 October 2026. The supplied input and acceptance rules are original teaching design; check current platform versions and your actual delivery contract before implementation.