FIELD NOTES · ACCEPTANCE EXERCISES

A late webhook must not quietly restore an older state

Receiving an event once does not prove it is safe to apply after a later update. Agree how the integration establishes current object state before changing a business record. A durable event inbox solves receipt and replay; it does not by itself solve out-of-order state transitions.

Who should use this acceptance brief

Businesses integrating CRM, orders or membership events. Use this as a scoped website handover task. Where real system evidence is required, teaching examples are not a substitute.

Source-bound platform fact

Stripe states that event delivery order is not guaranteed and that created timestamps are not an ordering or duplicate key. Retrieving the relevant current object may be required. Stripe: webhooks · Checked 16 October 2026.

Filled teaching example

Synthetic example, not a client case. Finite inputs, expected decisions and counterexamples follow; no live integration is claimed.

On narrow screens, scroll to read the complete table.

Input / caseCheck basisExpected decision
approved domain revision r8, incoming r7independent revisionignore stale
r8 → r9approved monotonic contractcandidate update
only event created timenot revision evidencereconcile current object

Run the acceptance exercise

  1. Separate event identity, receipt time and authoritative object revision or current-state evidence.
  2. Test newer-then-older delivery, duplicates and missing revision evidence.
  3. Record the reconciliation source and approved action without exposing event payload secrets.

Interpret the result and retain evidence

The checker uses a fictional monotonic domain revision explicitly supplied by the fixture. Stripe events do not magically provide that field. If the real product has no such revision contract, return reconcile rather than inventing order from a timestamp. The acceptance record should show the old state never wins merely because its message arrived last.

Limits before implementation

No production event processing, billing changes or fulfilment is performed. Not a complete concurrency or distributed-systems implementation.

Replay the finite example

Save both files in one folder and run with Node22.13 or newer. The example sends no network requests and changes no account or site. Filled inputs and expected outputs · Inspectable functions

node decision-check.mjs webhook-stale-state-acceptance.json