#vligas-webhook

1 messages · Page 1 of 1 (latest)

bitter harness
#

Hi there!

#

Although it didn't mention how long our webhook request will wait for a response, hmm, let me see if there's anything else that will help answer your question.

lavish ivy
#

thanks! I'd appreciate it, for more context the endpoint that handles the webhook is taking sometimes like 30s to complete with a 201, and in the dashboard it shows like an error with no status code nor body response

bitter harness
#

We timeout after 20 seconds when sending an event. Some endpoints could have a shorter timeout at 5 seconds if they are consistently not acknowledging events from Stripe.

crystal cargo
#

From real-world experience: they tolerate maybe 10 seconds sometimes.... BUT... something to remember is the ONLY "proper" response to a webhook is "yep, I got it" - there is NO OTHER VALID RESPONSE. YOU want to do more with it, to be sure - but Stripe doesn't particularly care about that. To that point:...

#

(NOT with Stripe, btw) All I do in the webhook response is add the event data to a queue (in my case, store it in a Firebase Firestore record), and immediately respond with a 200 status response. I have a "listener" on the writes of new event records, and do the "work" there, asynchronously, where turn-around time is entirely non-critical.

bitter harness
#

Thank you for jumping in @crystal cargo , highly appreciate it!

#

This is totally true! We encourage users to immediately respond with 2XX, and put the event in their queue for heavy processing, e.g. writing to database.

lavish ivy
#

Thank to both of you, I'll be making the changes 😄

bitter harness
#

Have fun coding!