I've been checking the Stripe documentation, and it suggests that we respond as soon as possible with a 200 code "It must be before we process it in our database".
Link: https://stripe.com/docs/webhooks#acknowledge-events-immediately.
I have some doubts:
Is it strictly required to always send Stripe response code 200?
In which cases is it necessary to send Stripe another response code? Like these: https://stripe.com/docs/api/errors
What would happen if after sending the 200 code to Stripe, the system for some reason fails to process an event in my database, update an invoice, subscription etc ... I can respond to Stripe with a 402 response so that it will forward me that same event, would it be a good practice?
How can I ask Stripe to send the same event again?
After sending Stripe a 200 response code, can Stripe retry sending the same event?