#dev-josue_docs
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/1357637783098753064
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
*My custom logic
Is it strictly required to always send Stripe response code 200 on stripe webhooks?
if you don't, Stripe will resend you the event a few times, untill you reply with a 200.
this is explained here: https://docs.stripe.com/webhooks#automatic-retries
@onyx arrow , basically, 200 response from the webhook indicates that it receives the event from stripe. Thus, the stripe will not send it again the event. Am I right?
yep. Stripe sends you the event. if you reply back with 200, then that's it. if you don't reply at all or reply a different with a different status code, Stripe assume you didn't receive the event, so it will try again.
About this https://docs.stripe.com/webhooks#handle-events-asynchronously, it is recommended to put complex logic on async and reply as soon as possible the 200 status code. The error on complex/custom logic is up to us how to handle it asynchronously. As long we already send 200 status code to stripe to indicate we receive it.
Did I get it right?
Create an event destination to receive events at an HTTPS webhook endpoint. Receiving webhook events is particularly useful for listening to asynchronous events such as when a customer's bank confirms a payment, a customer disputes a charge, a recurring payment succeeds, or when collecting subscription payments.
if you don't send a 200 reply within 20 seconds, Stripe will assume you didn't get the event and will resend it. to avoid this, we recommend to immediately return a 200 response.