library · inferred from evidence
stripe-node
The official Node.js library for interacting with Stripe's API.
- Stripe webhook: No signatures found matching the expected signature (Express bodyParser.json)
Mount a raw body parser on the webhook route before any JSON parsing: app.use('/webhooks/stripe', bodyParser.raw({type: 'application/json'})) (or express.raw({type:'application/json'})), then pass the raw buffer to stripe.webhooks.construct
- Stripe webhook signature mismatch on AWS Lambda: use raw event.body and the whsec_ secret
Pass the raw request body to constructEvent, not a re-stringified object: on Lambda use event.body as received (the raw string), since any JSON.stringify round-trip changes the bytes and breaks the signature. Also verify you are using the w