trichains/webhook-relaySandbox

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.

Open the dashboardSource on GitHub
  1. 01
    Verify

    HMAC-SHA256 with a 5 minute timestamp window, or the Hotmart hottok. Constant-time compare.

  2. 02
    Deduplicate

    Idempotency-Key header, else the payload id, else a body hash. A repeat gets 200 and is not delivered again.

  3. 03
    Store

    Raw payload, selected headers, verification result and event type go to Postgres before the 202.

  4. 04
    Deliver

    One delivery per matching destination, first attempt right after the response with after().

  5. 05
    Retry

    Exponential backoff with jitter: 30s, 2m, 8m, 32m, 2h 8m.

  6. 06
    Dead-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.