Live data from Hacker News

Billing systems are a nightmare for engineers

getlago.com

151–160 of 372 posts

Re: Billing systems are a nightmare for engineers

#151

Note OP makes a billing product (OSS, granted) so is motivated to characterize the field as complex and hard. In reality billing is just like many other processes humans engage in. For sure it's more complex than computing prime numbers, but hey try writing software to capture medical services processes :) In the end this is exactly what engineers are supposed to do: figure out ways to model/capture/represent complex…

This feels like a good moment to mention my most embarrassing bug which was, of course, in a billing system. I had written code to handle the overdue billing of customers' usage on an internet telephony service. The code seemed to work great in QA so we went ahead and pushed it to production.

A couple days later we got an angry call from a customer whose card we'd maxed out. The final stage of the process was to adjust their bill by the amount that they paid, but there was a sign error in that adjustment so instead of lowering their balance by the amount paid, we increased it. As a consequence, for a user with, say, a $50 balance, we kept doubling the amount that we charged them each day.

Exponential growth is a powerful thing.

Re: Billing systems are a nightmare for engineers

#152

Note OP makes a billing product (OSS, granted) so is motivated to characterize the field as complex and hard. In reality billing is just like many other processes humans engage in. For sure it's more complex than computing prime numbers, but hey try writing software to capture medical services processes :) In the end this is exactly what engineers are supposed to do: figure out ways to model/capture/represent complex…

I'm not sure this comment is exactly in good faith though-- OP does make a billing product but as a result is also uniquely qualified to provide insights into what can make it hard.

This isn't OP trying to claim it's the most difficult problem to solve from an engineering standpoint. Merely why it's hard.

Of course engineers solve problems, hard or not. That's not really being debated here is it?

Re: Billing systems are a nightmare for engineers

#153
post #27

Earlier quoted context omitted.

Not the OP, but anybody who has built a deep integration with any billing provider (inclusive of Stripe) knows there are some bodies buried, although you typically don't discover them until you're late in the game. 90% of your use cases are covered, and with excellent UX and docs to boot. But that sweet 10%! --- For a concrete example, Stripe has a very nice "subscription" abstraction that makes it easier to operate…

A lot of the time there’s trade-offs that can be made that engineers don’t even consider because they’re not pure. For example, why do you need a one-to-one relationship between your customers and Stripe customers? I am guilty of it myself, where an 80% solution is unacceptable from an engineering perspective but, actually, when balanced against the cost of building out a perfect solution, the business may well find…

The example you give is a smart one that we did explore!

Effectively, relationship is no longer user -> stripe customer, but user -> shipping_address -> stripe customer.

We decided the cost of implementing and maintaining this solution wasn't worth the benefit to the business. A credit to your later points.

We came up with a solution that allows us to ship one-off things to arbitrary addresses with correct tax calculation, and if a customer really wanted to setup a subscription to a distinct address, we could implement it in the future, hackily, with this primitive.

Re: Billing systems are a nightmare for engineers

#154
post #127

Earlier quoted context omitted.

Or better, buy a billing system instead of inventing one inhouse. Billing is hard to do correctly. For one thing it interconnects with so many different platforms in your company. For another thing, the cost of fucking something up is high--people don't exactly like seeing mistakes in their bill. Hell, think about tax... you wanna deal with that shit? To do it "correct" you've got to have people who truly understand…

Similar experience in some companies in my CV. Billing systems aren't fun to maintain, develop nor debug. They take a non-trivial amount of time when done wrong and if you are building one in-house you'll inevitably run into some mistake. Buy a billing system, it'll save engineering hours having to deal with it and if you choose right they'll scale with your company.

I totally agree with you, I had to work on the Qonto's billing system (that Raffi is talking in the blog post) and it wasn't fun to maintain. I remember the pain it was to change anything without breaking the whole system, not because the system was bad, but because it's complex and when you build it in-house, you will certainly take some shortcuts that makes it not so flexible!

Re: Billing systems are a nightmare for engineers

#155

Note OP makes a billing product (OSS, granted) so is motivated to characterize the field as complex and hard. In reality billing is just like many other processes humans engage in. For sure it's more complex than computing prime numbers, but hey try writing software to capture medical services processes :) In the end this is exactly what engineers are supposed to do: figure out ways to model/capture/represent complex…

I think this is a great article and sales pitch for the company, since a lot of the comments have been anecdotes of how its actually even HARDER than the author leads on.

Re: Billing systems are a nightmare for engineers

#156
post #102

Earlier quoted context omitted.

Just because you don't understand invoicing doesn't mean that the concerns that appear trivial to you are actually trivial. From the perspective of someone who works with the people who process the invoices, putting "X on the document" and "two pages long" can be a huge deal when you have to deal with hundreds of invoices or when "X" can mean that an invoice must proceed down a different processing path. These aren't…

They're trivial... when you make the same change to add something, remove it, add it, remove it and hear that it's all being done "because X" and "X" never stops, it's clearly not working and the changes are trivial.

No, the changes aren't trivial.

It sounds like you simply don't understand why they're doing it and you just assume that they're trivial because you have no knowledge of the domain.

Off the top of my head, I can thing of a dozen reasons for why they'd require something to be added, then removed, then added, etc., from one invoice to the next.

Re: Billing systems are a nightmare for engineers

#157

Note OP makes a billing product (OSS, granted) so is motivated to characterize the field as complex and hard. In reality billing is just like many other processes humans engage in. For sure it's more complex than computing prime numbers, but hey try writing software to capture medical services processes :) In the end this is exactly what engineers are supposed to do: figure out ways to model/capture/represent complex…

[deleted]

Re: Billing systems are a nightmare for engineers

#158

Do not worry. Blockchain will solve or at lease simplify all of these problems. It is the way.

Even if with blockchain and crypto you need to define a logic to bill your customer. This logic is pre-transactional and define how much you need to price the transaction.

Re: Billing systems are a nightmare for engineers

#159
As someone, who has built a billing system not once in my life, but twice (one for an internet privider I worked for, which counted the amount of traffic, and another one for a SaaS project(, I fully sympathize with the post. Billing is an unbelievable can of worms even before you get to taxes. Add in all the things the marketing people want from billing (trials, discounts, per-seat per usage pricing, etc), and you have enough tasks to last till retirement, no matter how young you are.

Re: Billing systems are a nightmare for engineers

#160
post #157

Note OP makes a billing product (OSS, granted) so is motivated to characterize the field as complex and hard. In reality billing is just like many other processes humans engage in. For sure it's more complex than computing prime numbers, but hey try writing software to capture medical services processes :) In the end this is exactly what engineers are supposed to do: figure out ways to model/capture/represent complex…

[deleted]

[deleted]
Post reply on HN