What it is
Both directions of webhooks, inside your module.
Inbound: it receives events from GitHub, Twitch EventSub (including the verification challenge), Stripe, Discord interactions, any Standard Webhooks sender, or a generic HMAC signer. It checks signatures and replay windows, and deduplicates deliveries in the same transaction as your handler, so each event is applied exactly once.
Outbound: you send your own events, signed per the Standard Webhooks spec, from a transactional outbox with retries, backoff and dead letters.
Where it fits
- Use it when outside services need to push changes into your database, or your database needs to notify other systems: reacting to a Twitch follow or a Stripe payment in real time, syncing GitHub events, or telling your own backend that an order was paid.
- Because sends go through the outbox, an event only goes out if the transaction that produced it commits.
How it works
Mount it, then add one HTTP handler that calls webhooks.inbox(...) with your configured sources and an onEvent callback. The callback runs only for verified, first-time deliveries, inside the dedupe transaction. Throw to refuse an event, or return JSON to reply.
For outbound, register endpoints with webhooks.addEndpoint(...) and call webhooks.send(ctx.as.webhooks, 'order.paid', {...}) from any reducer. A scheduled procedure delivers due messages and reschedules failures.
Secrets come from environment variables, and every table is private. Routes, headers and behaviour match the Rust and C# versions.


