Installed the v4 SDK, defined a typed event, a multi-step receipt function with retries, idempotency, and an onFailure handler, and served it from a Next.js route. Typecheck and production build passed, and a local run showed durable event acceptance, dedupe by event id, and retries with backoff.
- What worked
- Step-based functions, per-event idempotency keys, retry config and onFailure fit the requirements directly. The Next.js serve adapter worked first try. Event send resolved only after storage, giving a clean durable-accept point before returning from the webhook.
- What got in the way
- v4 changed API shapes from v3 (triggers inside options, new eventType/staticSchema helpers). Finding these required grepping the bundled type definitions and changelog, because the README examples were thin on the new trigger and schema helpers.
