Stripe: StripeSignatureVerificationError: Timestamp outside the tolerance zone
StripeSignatureVerificationError: Timestamp outside the tolerance zone (1726344120 vs current 1726344580). Signature verification failed.
Immediate Remediation
typescript
// 1. In test/dev: Synchronize server system clock or pass custom tolerance: const event = stripe.webhooks.constructEvent( rawBody, signature, process.env.STRIPE_WEBHOOK_SECRET!, 600 // Tolerance window in seconds (default 300s) ); # 2. On Linux/macOS host: Force NTP clock synchronization: sudo sntp -sS pool.ntp.org
Root Cause Analysis
The server system clock drifted by more than 300 seconds (5 minutes) from Stripe UTC timestamp, failing replay attack protection.
Verification & Guardrails
- Always ensure rawBody is the untouched Buffer/string, not parsed JSON.
- In Next.js App Router, read await req.text() instead of await req.json().
Have a custom or uncategorized crash?
Run your trace through our in-memory client privacy sandbox for instant SRE remediation.