Menu

Stripe webhook not verified, or missing
📰

Stripe webhook not verified, or missing

DEV Community: database·Axonscape·1 day ago
#tCTGK595
#devtodatabase#devto#dev#stripe#webhook
Reading 0:00
15s threshold

A Stripe webhook that doesn't check the signature lets anyone post a fake “payment succeeded”. Without a webhook at all, subscriptions never update when payments fail or are cancelled.

What you see

Subscriptions stay active after a failed payment, or the webhook route acts on any JSON posted to it.

Why it happens

The webhook route skips stripe.webhooks.constructEvent , the call that proves an event came from Stripe, or no webhook route exists.

How to fix it

Verify every event with stripe.webhooks.constructEvent(rawBody, signature, STRIPE_WEBHOOK_SECRET) before acting on it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.