Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

(Yikes) I feel compelled to remind the folks complaining about webhooks arriving out of order of the fallacies of distributed computing.

https://en.wikipedia.org/wiki/Fallacies_of_distributed_compu...

For goodness sakes, log webhooks to a queue and rebuild the object graph later by probing their API. I would be absolutely blown away if Stripe recommended that folks attempt to process these inline (simple tutorial-level example code notwithstanding).

EDIT: And for your own sanity, assume 50% of the webhooks you expected to arrive didn't. Schedule a periodic task to scrape transactions from their API.



> EDIT: And for your own sanity, assume 50% of the webhooks you expected to arrive didn't. Schedule a periodic task to scrape transactions from their API.

I'm pretty sure the Webhooks keep retrying until they get a success response back from your server.



They do it for 3 days though which seems more than enough... and you can even manually trigger them from the dashboard. So I'm not really seeing why you can't just rely on Webhooks?


You can rely on them. I just wanted to correct what was said in that comment.


Yeah, this is specifically pointed out here: https://stripe.com/docs/webhooks/best-practices#acknowledge-...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: