hookdeck/webhook-skillsMIT8 files

Webhook Handler Patterns

>

Specification
Skill ID
hookdeck/webhook-skills/webhook-handler-patterns
Publisher
hookdeck
Repository
webhook-skills
Installs
0
Files
8
License
MIT
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

hookdeck/webhook-skills/webhook-handler-patternsInstalls these files
  • SKILL.md
  • references/error-handling.md
  • references/frameworks/express.md
  • references/frameworks/fastapi.md
  • references/frameworks/nextjs.md
  • references/handler-sequence.md
  • references/idempotency.md
  • references/retry-logic.md

What this skill tells the agent

Webhook Handler Patterns

When to Use This Skill

  • Following the correct webhook handler order (verify → parse → handle idempotently)
  • Implementing idempotent webhook handlers
  • Handling errors and configuring retry behavior
  • Understanding framework-specific gotchas (raw body, middleware order)
  • Building production-ready webhook infrastructure

Resources

Handler Sequence

  • references/handler-sequence.md - Verify first, parse second, handle idempotently third

Best Practices

  • references/idempotency.md - Prevent duplicate processing
  • references/error-handling.md - Return codes, logging, dead letter queues
  • references/retry-logic.md - Provider retry schedules, backoff patterns

Framework Guides

  • references/frameworks/express.md - Express.js patterns and gotchas
  • references/frameworks/nextjs.md - Next.js App Router patterns
  • references/frameworks/fastapi.md - FastAPI/Python patterns

Quick Reference

Handler Sequence

  1. Verify signature first — Use raw body; reject invalid requests with 4xx.
  2. Parse payload second — After verification, parse or construct the event.
  3. Handle idempotently third — Check event ID, then process; return 2xx for duplicates.

See references/handler-sequence.md for details and links to provider verification and idempotency patterns.

Response Codes

CodeMeaningProvider Behavior
2xxSuccessNo retry
4xxClient errorUsually no retry (except 429)
5xxServer errorRetry with backoff
429Rate limitedRetry after delay

Idempotency Checklist

  1. Extract unique event ID from payload
  2. Check if event was already processed
  3. Process event within transaction
  4. Store event ID after successful processing
  5. Return success for duplicate events

Related Skills

Use this skill in a project

Open any RiverX project, search the Skills panel for hookdeck/webhook-skills/webhook-handler-patterns, and install it in one click.

Use this skill