Live data from Hacker News

Billing systems are a nightmare for engineers

getlago.com

21–30 of 372 posts

Re: Billing systems are a nightmare for engineers

#21
post #4

A classic, from http://www.canonical.org/~kragen/tao-of-programming.html > There was once a programmer who was attached to the court of the warlord of Wu. The warlord asked the programmer: ``Which is easier to design: an accounting package or an operating system?'' > ``An operating system,'' replied the programmer. > The warlord uttered an exclamation of disbelief. ``Surely an accounting package is trivial next to th…

Heh, I'd say the operating system is easier to debug, because the accounting package could literally have "bugs" that are caused by errors in the tax laws, business processes, etc, which cannot be fixed, only worked around.

Re: Billing systems are a nightmare for engineers

#23
post #4

A classic, from http://www.canonical.org/~kragen/tao-of-programming.html > There was once a programmer who was attached to the court of the warlord of Wu. The warlord asked the programmer: ``Which is easier to design: an accounting package or an operating system?'' > ``An operating system,'' replied the programmer. > The warlord uttered an exclamation of disbelief. ``Surely an accounting package is trivial next to th…

The linked page does not show it, but The Tao of Programming is actually a book which you can buy:

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

I own a copy; it’s great.

Re: Billing systems are a nightmare for engineers

#25
Depends on your requirements I would say. If your target customers are global, then yes, you'll have to deal with a lot of rules and regulations. But the engineering side of things I don't think is that hard.

Perhaps when you first enter the domain it seems like a lot because you are unfamiliar with it, but such is it with all things.

Also, these guys have an economical incentive of convincing you it's hard. So keep that in mind.

Re: Billing systems are a nightmare for engineers

#26

Random idea: Don't build a billing system. Or at least not a precise one. Have a price list as normal, but just guestimate the user's bills based on any easily accessible information. Eg. For a hosting company I might just count how many VM's they have active when the billing script runs . If the user isn't happy with the total, give them a button to correct the total and pay that. Spot check what the user's pay, and…

How does auditing work if billing is non-deterministic?

Re: Billing systems are a nightmare for engineers

#27

This has been my life for the past few months. Billing and dates / times are the worst part of the job.

Have you looked at existing solutions? Why did not they fit?

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 SaaS business. They also offer a nice "tax" product, that doesn't do filing for you, but does offer tax computation if you code your products appropriately. Sounds great!

But if you want to sell 2 subscriptions to the same customer, and those 2 subscriptions are fulfilled in 2 distinct taxable regimes (say, you're shipping widgets to NYC once per month and to a vacation home in NH once per quarter), you're screwed because Stripe only allows 1 shipping address for customer for tax purposes, and each subscription references this address when computing tax.

We went through support, which filtered through to engineering, and the eventual answer was "no plan to change this anytime soon", which is difficult to interpret any other way than "good luck". :)

There is no clean or even acceptably-dirty solution to this problem, tragically. So as a business we can't allow customers to transact with us this way. Oh well.

There's another, similar, story around creating draft invoices to give people quotes before checking out. The dashboard API has a function to modify the line items of a draft invoice, but it's not a public-facing API and there's no short-term intention to make it public-facing, so one has to build an ugly workaround.

This effectively means one needs to maintain internal models for subscriptions, products, taxes, invoices, invoice items, products, shipping addresses, on and on. And Stripe becomes a somewhat-dumb processor for these models (although the state machine for subscriptions is admittedly very valuable).

I'd love to "offshore" everything to Stripe, status as the source of truth for data included, but it's not feasible in a surprising frequency of scenarios.

Caveat that every payment provider is like this, Stripe is much better and actually improves over time.

Re: Billing systems are a nightmare for engineers

#28
post #13

Any kind of business or accounting system tends to be an endless long tail of "can the invoicing system send the invoice in Esperanto using only 16-bit Unicode characters on Tuesdays but only while it is raining and only for customers whose last names end with E and who signed up more than one year ago according to the Chinese calendar?" type features. That's why attempts at "no-code" systems where biz/accounting peo…

The #1 reason those systems are moderately successful: When your sales person needs to write the logic for billing customer X, they'll try to make the customer contract more reasonable.

Normally sales people are deal-driven, and if promising the customer "14% off on the first three transactions on every rainy Tuesday, unless Monday was also rainy" gets the deal closed, then that's going in the contract.

No better way to ensure the contracts are reasonable, than making sure the person negotiating the deal feels the pain of billing it

Re: Billing systems are a nightmare for engineers

#29

Random idea: Don't build a billing system. Or at least not a precise one. Have a price list as normal, but just guestimate the user's bills based on any easily accessible information. Eg. For a hosting company I might just count how many VM's they have active when the billing script runs . If the user isn't happy with the total, give them a button to correct the total and pay that. Spot check what the user's pay, and…

I love it, sounds like the Swedish shops with no cashier https://mashable.com/article/swedish-store-cashiers Has it been tried before? How were disputes managed?

Re: Billing systems are a nightmare for engineers

#30

Just wait until you meet billing's angry roommate: invoicing. In the US, an invoice is just a weird PDF that you might glance at before sending off to your accounts payable team. But in other countries, especially those that use VAT style taxing systems, an invoice can be a legal document that expresses costs and taxes in a legally prescribed way for accounting purposes. Many countries have prescriptive rules over ho…

Just one of many reasons its easier to do business in the US
Post reply on HN