stripe-payments-demo

Stripe webhook idempotency and payment intent retry patterns, ported to Next.js 16 App Router for Vercel deploy.

Endpoints

Sequence

Stripe -> POST /api/webhook
  verify Stripe-Signature (HMAC-SHA256)
    invalid -> 400
    valid   -> SETNX stripe:event:{id} EX 86400
                duplicate -> 200 { duplicate: true }
                new       -> dispatch by event.type -> 200

Source: github.com/Shailesh93602/stripe-payments-demo