#heavenly father

1 messages · Page 1 of 1 (latest)

severe cairnBOT
silent lotus
#

Hi there!

#

Can you share the event ID (evt_xxx)?

midnight tusk
#

Yes please

#

[evt_1MyaJmBxCytoOvCpGD6xXqYs], [evt_1MyaNGBxCytoOvCpqfigSZVC]

silent lotus
#

From our end it looks like we sent you this event, and you server returned a 200 status.

#

So what exactly is the issue?

midnight tusk
#

The issue I belive is the response body of my webhook is not in raw format so signature verification cannot verify and get the event

silent lotus
#

Can you share the exact error message you see? Like I said on our end there's no error, your server returned a 200 response.

midnight tusk
silent lotus
#

And from your server logs?

midnight tusk
#

The problem is my endpoint is not getting the binary format, when I log responseObject.body i get json

#

But I have done this

silent lotus
#

The problem is my endpoint is not getting the binary format
How do you know this? I don't see any error related to this in your screenshots.

midnight tusk
#

Please hold

silent lotus
#

Are you getting a SignatureVerificationError?

midnight tusk
#

No please, the request is acknowledged by stripe servers and I get a 200 from they but when it webhook triggers I get a 400

silent lotus
#

If you get a 400 error, then you should have error logs on your backend server explaining exactly what the error is. Can you share this error message here?

midnight tusk
#

I don't have any complex setup here, I use a morgan as a middleware to report status on my endpoint and I showed you earlier. I bear touched the boiler-plate code from stripe.. this is my code https://dpaste.org/3eoXr

silver crest
#

Hello 👋
Taking over as soma needs to step away.
Can you try changing following?

express.raw({ type: "*/*"})

midnight tusk
#

Thank you hanzo, you mean inside my api call I should effect this changes

silver crest
#

wait, how exactly are you triggering these webhook events?

#

you mean inside my api call I should effect this changes
The screenshot you shared does a server.post to the webhook endpoint

midnight tusk
#

Ok..Please hold

#

After configuring the stripe cli, I have logged in, then I did stripe listen on my localhost:5000/api/stripe_events/webhook, then I triggered the action just as in the manual of webhooks

midnight tusk
silver crest
#

Can you try changing the express.raw as I suggested above?

midnight tusk
#

I have, Still a 400 from webhook endpoint. This I assume will be a typical problem for most stripe users but if I may ask, what will bring the kind of error where post returns 400 to webhook

silver crest
#

This isn't a Stripe error though. This is something your code is throwing after successfully receiving the events.
Your server logs should have more information on what's causing this 400

#

We can't see it on our end because the delivery was successful and your code returned a 200

midnight tusk
#

Sure.. thanks