Blog

Webhook endpoints and browser CORS: why Stripe-style callbacks are server-to-server

Providers POST signed events to your URL; browsers never call these endpoints directly, so CORS is irrelevant there.

1 min read
webhookssecuritycors

Developer mistakes

Pointing a SPA fetch at a webhook URL will fail CORS by design—use a normal REST route for user actions.

Local testing with Stripe CLI tunnels still bypasses browser CORS because the CLI is not a web origin.

Security

Rotate webhook secrets per environment; never reuse API keys meant for browsers.

IP allowlists complement signature verification when providers publish stable ranges.

Back to blog