Universal Webhook Idempotency Receipt Guard
Release: GCD-INT-001 v1.0.1
Authenticate first. Verify the provider signature against the exact raw body before using its event ID or digest. The guard is not a signature verifier.
Five-minute verification
- Install Node.js 20 or newer.
- Open a terminal in this extracted folder and run
npm test.
- Run
npm run example; the expected output is process.
- Read the atomic store contract in
README.md.
Production integration
- Implement a shared durable store with an atomic claim operation.
- Verify the webhook signature, then SHA-256 hash the verified raw body.
- Call
begin() before business side effects.
- Complete the receipt only after all intended effects succeed; release only safely retryable failures.
- Exercise new, duplicate, conflict, crash, and retry paths in staging.
The in-memory example is intentionally not production storage. Review retention, privacy, observability, provider retry behavior, and rollback before deployment.