Skip to content

Webhooks

Source-backed example app: examples/webhooks/

Use this example when product events need to fan out to customer-owned webhook endpoints. It wires slingshot-webhooks into an app, registers a toy order event, and publishes that event from a route so the webhook dispatcher can deliver signed HTTP requests.

  • createWebhooksPackage() with subscribed events
  • event registration with tenant webhook exposure
  • a source plugin publishing a typed event
  • per-endpoint delivery timeout support
  • HMAC signature verification on the receiver
  • examples/webhooks/src/index.ts
  • examples/webhooks/app.config.ts

The example sets allowPlaintextSecrets: true only so it can run with the in-memory adapter. Production deployments should set secretEncryptionKey or provide a custom encryptor, and should back delivery with a durable queue such as BullMQ.