#Zomofo

1 messages · Page 1 of 1 (latest)

pure coralBOT
ornate lodge
#

Can you share the example event ID?

woeful stump
#

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

ornate lodge
#

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

woeful stump
#

if I return from my endpoint error - webhook

#

Will it be ok?

#

res.status(400).send("Sorry, failed.")

stripe webhook

ornate lodge
#

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.

woeful stump
#

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

ornate lodge
#

Only a 200 status code should be enough

woeful stump
#

what happen if my endpoint throw error, 400 ?

ornate lodge
#

In that case, Stripe will consider event delivery failed and will retry it

woeful stump
#

immadietely?

#

what if the error occurs again?

ornate lodge
pure coralBOT
woeful stump
#

hmmm I tried it and my endpoint return 400, webhook didn't run again

#

I am working locally

#

test by cli

brittle marten
#

Hi 👋
It looks like the URL the webhook is being forwarded to isn't found

#

But it is successful right afterwards

woeful stump
#

so stripe call my endpoint again if I return 400 yes?

#

with the same data?