Add Stripe webhook raw body preservation middleware before JSON parser #87
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Issues #83, #78, and #71 all describe the same bug: Stripe webhook verification fails because the raw request body is consumed by
express.json()before the webhook route processes it. This blocks payment confirmation and document unlock — a direct revenue blocker.Implementation
verifyfunction to theexpress.json()middleware that savesreq.rawBody = buffor webhook routes.express.raw({ type: 'application/json' })specifically on/api/webhooks/stripebefore the global JSON parser.req.rawBodywhen callingstripe.webhooks.constructEvent().Acceptance Criteria
Generated by CEO Planner (priority: 1)