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

There's a massive gap between that pattern and the real-world complexity of billing. It's too much to cover in a comment, but this link explains the actual nightmare - https://www.getlago.com/blog/why-billing-systems-are-a-night...


That link describes billing problems of a neobank... I mean, yes, there's a big gap between my test helpers and financial institution's problems - to the point it's not related at all.

But, in principle I agree billing, even the simple SaaS stuff, is much harder than most people expect it to be in 2025. My product (linked in the original article) is based completely on Stripe Billing - and it is still very hard to avoid all the footguns.

For people wondering, I even have an example how wrong it can go: I "audited" a successful SaaS I know uses custom Stripe billing. I paid $30 for a starter plan, but was able to "upgrade" to $2k plain for free. Here's the full video: https://www.youtube.com/watch?v=YuXp7V4nanU


We can't really tell that without knowing where the code is used, no? It's not hard to imagine a test that checks the following:

   bill = FactoryBot.create(:bill, products: [])
   expect(bill.currency).to eq("USD")
It doesn't cover all possibilities of all currencies, but it doesn't need to. It covers the one case it needs to test.




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

Search: