LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Don't trust the browser
  4. · 4 minutes · Pro

The webhook anyone could send

Twelve accounts upgraded to Pro overnight. shows no payments from any of them.

This answers: Why must I verify Stripe webhook signatures? No coding needed. 3 quick decisions.

  • Payments and webhooks
  • Keys and secrets

Checking your access…

Why must I verify Stripe webhook signatures?

Because your URL is public and anyone can send it a fake 'checkout completed' event with their own user id. signs every event with your webhook signing secret. Verify the Stripe-Signature header with stripe.webhooks.constructEvent using the raw request body, reject anything that fails, and only then grant access or credits.

Trail of the bug
  1. Stranger
  2. Your server
  3. Database

Breaks at Your server: Webhook never checks Stripe's signature

Why AI tools write this bug

AI tools often parse the body as JSON and act on it, skipping signature checks because they need the raw body and a secret to be configured.

How to fix it

  1. Add STRIPE_WEBHOOK_SECRET to server settings.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Isn't a long secret URL enough?
No. URLs leak through logs, code and screenshots, and common paths like /api/stripe/webhook are easy to guess. Signatures prove the sender.

Related scenarios

  • The key in the bundleFree · 4 min
  • The agent that reset productionFree · 5 min
  • The $1 Pro planFree · 4 min

More on this trail

Don't trust the browser: Prices, webhooks, uploads, form limits and coupons: what visitors can change, and what your server must decide.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

3 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Add STRIPE_WEBHOOK_SECRET to server settings.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock