Setup Stripe webhook


I like to move my stripe-webhook to mongodb. Currently I have a nodejs server where I can get the raw body from the request like (because stripe needs the raw request body)’/webhook’, bodyParser.raw({ type: ‘application/json’ }), (request, response)

Is it possible to get the raw body request somehow in a mongodb webhook?


Do these docs help - ?
Sounds like you may want to use one of the parse functions.

hm sadly not. Non of them were successfully.

the raw body on my nodejs application was like:

<Buffer 7b 0a 20 20 22 63 72 65 61 74 65 64 22 3a 20 31 33 32 36 38 35 33 34 37 38 2c 0a 20 20 22…

and stripe error is like:

“Webhook Error: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?

Hi @rouuuge.

For some general examples of working with Stripe from Realm. you could take a look at this eCommerce app that I built a while back: For example, this function creates a Stripe checkout session:

The frontend (Vue.js) app is here:

1 Like

hi andrew, thx for the example! Good to know that at least the stripe api seems to work! But for me its not really a option, because I use the UI-Forms directly from Stripe directly:

to get data into mongodb I need their webhook. Of course I could run a own nodejs server like now. But I would like ot move as much code as possible to the same place.