## TL;DR

Stripe's own troubleshooting docs call this out: disable bodyParser and read the request as a buffer.

## Steps

1. Pages Router API routes parse the JSON body before your handler runs. Stripe's signature is computed over the raw bytes, so a parsed-then-reserialized body fails verification. Stripe's own troubleshooting docs call this out: disable bodyParser and read the request as a buffer.

2. - `bodyParser: false` is set, otherwise the stream is already consumed.
- Pass the buffer as a UTF-8 string to constructEvent, not a parsed object.
- The signing value comes from the webhook endpoint settings in the Dashboard.
- Return 400 on signature failure, 200 only after accepting the event.

## When to use

You are seeing this: Pages Router API routes parse the JSON body before your handler runs. Use this skill when you run into "Stripe webhooks on Next.js Pages Router: disable bodyParser, verify from the buffer".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

App Router route handlers get a standard Request and you call request.text().
