Webhook Relay
A webhook gateway for payment and sales platforms like Hotmart or Stripe-style checkouts. It sits between the platform and your apps: it checks signatures, makes sure the same event is never processed twice, keeps retrying when your receiver is down, and keeps a searchable log you can replay from.
- 01Verify
HMAC-SHA256 with a 5 minute timestamp window, or the Hotmart hottok. Constant-time compare.
- 02Deduplicate
Idempotency-Key header, else the payload id, else a body hash. A repeat gets 200 and is not delivered again.
- 03Store
Raw payload, selected headers, verification result and event type go to Postgres before the 202.
- 04Deliver
One delivery per matching destination, first attempt right after the response with after().
- 05Retry
Exponential backoff with jitter: 30s, 2m, 8m, 32m, 2h 8m.
- 06Dead-letter & replay
Failed deliveries land in a queue you can inspect and replay, one event or a whole destination.
This demo runs without a database: PGlite (Postgres compiled to WASM) runs in memory with seeded data, and retries are compressed to seconds so you can watch them. Built by Cristhian Almeida.