#Zomofo
1 messages · Page 1 of 1 (latest)
Can you share the example event ID?
I have this
res.status(400).send("Sorry, failed.")
in promise then
and later in code I have
res.send();
at the end of function
probably I send response two times
and get this error
but I dont know how to do this when I have then in javascript
I have callback in then
I am using express.js
This doesn't seem like an issue with Stripe API or anything.
Have you googled the error yet? If not, I'd recommend looking through stackoverflow results as they should help narrow down and figure out what's going on
if I return from my endpoint error - webhook
Will it be ok?
res.status(400).send("Sorry, failed.")
stripe webhook
Fastest way to know would be to try it out.
Again, this isn't really related to Stripe. Its your code that's running on your server throwing this error. Our team on discord can't help much with that.
You'd need to figure this out by looking through JS docs, googling the error and trying diff solutions.
ok so, what should I return from my endpoint to be ok with webhook?
if I have to return status 200?
from my app to stripe
Only a 200 status code should be enough
what happen if my endpoint throw error, 400 ?
In that case, Stripe will consider event delivery failed and will retry it
Then stripe will keep retrying (with backoff) until we receive 200
We explain this in our docs here
https://stripe.com/docs/webhooks/best-practices#retry-logic
hmmm I tried it and my endpoint return 400, webhook didn't run again
I am working locally
test by cli