⚙️

Webhook Delivery System

Build a reliable outgoing webhook delivery system with retries

Intermediate⚙️ BackendAll Models
prompt template
Build a webhook delivery system for:

**Events:** [EVENT_TYPES — e.g., "order.created, payment.completed, user.signup"]
**Expected subscribers:** [SUBSCRIBER_COUNT]

Generate:
1. **Webhook registration** — API for subscribers to register endpoints and select events
2. **Payload format** — standardized event envelope with signature verification
3. **Delivery engine** — async delivery with configurable timeout
4. **Retry policy** — exponential backoff (1m, 5m, 30m, 2h, 24h) with dead letter
5. **Signature verification** — HMAC-SHA256 signing so receivers can verify authenticity
6. **Delivery log** — track every attempt with status code, response time, and body
7. **Circuit breaker** — disable endpoints that fail consistently
8. **Testing endpoint** — let subscribers send test events to verify their handler

Include TypeScript implementation for the webhook manager and delivery worker.

How to Use This Prompt

  1. 1Copy the prompt template above
  2. 2Paste into Claude, ChatGPT, or Cursor
  3. 3Replace [bracketed placeholders] with your specific project details
  4. 4Iterate on the AI output to refine and customize the results