Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Webhook Handling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-webhook-handling)
---
name: webhook-handling
description: "Robust webhooks: raw-body signature checks, idempotency by event ID, fast acknowledgement, async processing, ordering and replay."
tags: [payments, backend, security]
---
# Webhook Handling
## When to use
- Receiving webhooks from payment providers, GitHub, Slack, etc.
## Procedure
1. Read the raw body before JSON parsing
2. Verify HMAC with constant-time compare
3. Reject old timestamps
4. Store event ID with a unique constraint
5. Return 2xx fast and process async
6. Handle out-of-order events by checking current state
## Checklist
- [ ] Replay test
- [ ] Duplicate test
- [ ] Invalid signature test
## Anti-patterns
- Doing slow work before responding
- Verifying against re-serialised JSON