#bobo00011

1 messages · Page 1 of 1 (latest)

eternal pikeBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

crimson shoal
#

Hello there

#

Let's use this thread to chat

#

If you summarize your issue then I'd be happy to help

twin lodge
#

probably

#

this

#
app.use(express.urlencoded({extended: true}));```
#

this code cause problem

#

in my app

crimson shoal
#

Are you trying to verify a webhook signature here?

twin lodge
#

hmmm could you explain

#

?

#

i have to pass buffer

#

but I have object

#

checkout session

#

i cant remove it

crimson shoal
#

Right you are trying to verify your Webhook

#

So what you likely want to do is use something like: app.use((req, res, next) => { if (req.originalUrl === '/webhook') { next(); // Do nothing with the body because I need it in a raw state. } else { express.json()(req, res, next); // ONLY do express.json() if the received request is NOT a WebHook from Stripe. } }); in your code

#

Where you say for the specific endpoint that has your webhook code you don't use express.json()

twin lodge
#

express.json()(req, res, next);

#

in this way

#

?

#

is it correct?