#mahima-thacker_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ 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.
- mahima-thacker_docs, 1 hour ago, 23 messages
- mahima-thacker_docs, 4 hours ago, 13 messages
- mahima-thacker_error, 3 days ago, 40 messages
hi there!
can you check your server logs to understadn why your server is returning 400 errors?
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)
can you add some logging to your code to understand what exactly is cause the error?
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.
that's great, making progress! this is actually a common error, we have some docs about this that I recommend you reading: https://docs.stripe.com/webhooks/signature
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
have you checked all solutions listed in the Github issue? https://github.com/stripe/stripe-node/issues/341