AgentStack
SKILL verified MIT Self-run

Webhook Handler Patterns

skill-hookdeck-webhook-skills-webhook-handler-patterns · by hookdeck

>

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add skill-hookdeck-webhook-skills-webhook-handler-patterns

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Webhook Handler Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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](references/handler-sequence.md) - Verify first, parse second, handle idempotently third

Best Practices

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

Framework Guides

  • [references/frameworks/express.md](references/frameworks/express.md) - Express.js patterns and gotchas
  • [references/frameworks/nextjs.md](references/frameworks/nextjs.md) - Next.js App Router patterns
  • [references/frameworks/fastapi.md](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](references/handler-sequence.md) for details and links to provider verification and idempotency patterns.

Response Codes

| Code | Meaning | Provider Behavior | |------|---------|-------------------| | 2xx | Success | No retry | | 4xx | Client error | Usually no retry (except 429) | | 5xx | Server error | Retry with backoff | | 429 | Rate limited | Retry 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

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.