News for hackers. Stuff that matters.
Re:Down the Cloudflare / Stripe / OWASP Rabbit Hole: A Tale ... by davedx on Monday February 20, 2023 @10:11AM (#34868799)
> The obvious approach is to have an event list which you as customer long-poll or just poll every few seconds

This is also much much easier for the payments integrations developers to test, compared to all the messing about and running dodgy proxies that testing webhooks involves.

Webhooks for critical application paths just seem like a bad idea all around really

Re:Down the Cloudflare / Stripe / OWASP Rabbit Hole: A Tale ... by bmizerany on Monday February 20, 2023 @03:04PM (#34872226)
> Webhooks for critical application paths just seem like a bad idea all around really

Well, put. I've been deep in the Stripe API for a while now, and the invoices API provides up-to-date account status information and what a customer is paying for. This can be referenced as needed and, if desired, cached with some TTL and referenced as the "truth." Then webhooks can be viewed as a convenient way to bust the cache quicker than waiting for the TTL to expire.

It could be better, but it provides the necessary information without relying on webhooks.

An example of how we use this API as a form of entitlement checks at Tier can be found here: https://github.com/tierrun/tier/blob/f7c32426d30ca314706ca7e...