For the LiveKit entry, webhook processing begins before JSON parsing. The webhook documentation requires the raw request body for signature verification.
Preserve those bytes, verify the event, and only then process its contents. Use event IDs to make repeated deliveries harmless. Retries do not guarantee that every event will arrive, so important application state also needs a reconciliation strategy.
Test an unchanged payload, an altered payload, and a duplicate event. Each should produce a deliberate result rather than an accidental second action.