#mahima-thacker_webhooks

1 messages ¡ Page 1 of 1 (latest)

tall mesaBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1295717351286767676

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

unborn elk
#

hi there!

#

can you check your server logs to understadn why your server is returning 400 errors?

signal island
#

Yep, I checked but I am getting these logs only: POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/payment: ::1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)
POST /api/v1/webhook: ::1 Stripe/1.0 (+https://stripe.com/docs/webhooks)

unborn elk
#

can you add some logging to your code to understand what exactly is cause the error?

signal island
#

Okay sure

#

Oh yeah, it says now: Stripe signature: t=1728993874,v1=c90cc2ecf1389f2f69c8113fb8912532800d64de5cbd976bf3c1c914e02d5d22,v0=50851aff7aed438cc255d6e6450d53dbd098c580b3c0604a5b27b5a66acb242e
Raw body received: [object Object]
Webhook signature verification failed: Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the raw request body.Payload was provided as a parsed JavaScript object instead.
Signature verification is impossible without access to the original signed material.

unborn elk
signal island
#

Okay, let me look into it. Thanks

#

I tried using payment.post('/webhook', bodyParser.raw({ type: 'application/json' }), async (req, res) => {
and also express.raw but still facing the same error

unborn elk