Duplicate Webhook Lab — Stripe + TypeScript (Free)
See how one webhook delivered twice can grant credits twice—and run a corrected handler that records the event and local credit grant in one database transaction.
YOUR FREE DOWNLOAD
• Broken and corrected TypeScript examples with synthetic payment events.
• A before/after demo, SQLite storage, and 10 tests covering duplicate delivery, rollback, persistence, and concurrent processes.
• Setup instructions and permission to adapt the sample.
REQUIREMENTS
Node.js 24.18 or newer; basic JavaScript/TypeScript and SQL knowledge. Verified on Windows with Node 24.18.0. Extract, run npm run demo, then npm test. No npm install, Stripe account, API keys, or Docker required.
Free download through Payhip. An email address is required for delivery; no payment details required.
WANT THE OTHER FAILURE CASES?
The US$19 Webhook Failure Lab — Stripe + TypeScript includes this lab plus out-of-order subscription events and work lost after a premature 200 response: three labs, 20 tests, and combined walkthrough/adaptation guides.
BOUNDARIES
An offline educational reference, not a live Stripe integration. No HTTP/signature verification or exactly-once external actions. Event-ID deduplication does not deduplicate separate events for the same business action. No implementation services, security audit, warranty of suitability, or promised future updates. Share and adapt the sample with the attribution in the included usage terms. Independent product; not endorsed by Stripe.