3 ms·
I’ve generally thought that POST we hooks are the wrong abstraction for this type of payment confirmation, and reading this makes me believe it even more: This
by amluto 4y ago
I’ve generally thought that POST we hooks are the wrong abstraction for this type of payment confirmation, and reading this makes me believe it even more:
This whole process needs something like a message queue. Stripe should publish and event to the queue, and HIBP should receive that event. A message queue is still subject to network failures, but any sensible implementation will notice and recover missed events.
- wlonkly 4y agoThe queue/DLQ in this case is on Stripe's end. Once the WAF problem was fixed, Stripe ran the webhooks correctly.
- amluto 4y agoWith a real queue, dropping one message on the underlying transport will either be detected quickly and obviously on both ends, or will be recovered automatically, or both. The implementation could be as simple as a queue id and sequence number in the POST along with a way to request replay (via GET to Stripe) of old messages indexed by the same id and sequence number and a way to periodically ask for the latest sequence number.