Sphinx
Your webhook handler now saves the event ID before calling charge(). Stripe times out and sends the same event again. What happens on the retry?
You
It runs twice, so the customer is charged twice.
Sphinx
Not quite. The retry finds the saved ID and returns 200 without charging. But that ID is stored before the charge succeeds. If charge() fails, what does the next retry do?
You
It skips the charge, so the customer is never billed.
An illustrative exchange. Real questions come from your diff.