Live data from Hacker News

Billing systems are a nightmare for engineers

getlago.com

281–290 of 372 posts

Re: Billing systems are a nightmare for engineers

#281
post #179

Implementing and maintaining billing is my daily job for the last 6 years. I would also mention topics like: - Reporting (various data aggregation and audit reports) - High reliability, nothing hurts company more than unability to bill their customers - Rounding, this can be seen as a subset of "taxes" but it's much more complex - Locating user, also can be seen as a subset of "taxes" but user can have country A set…

Yeah, Audit for the win.

And it's not "billing", it's Compliance + Bill Presentment (marketing!) where we are always trying to find the most profitable local maximum of explainability to Sales, Customers, and Management/Enforcement while also having hard checks to prevent or at least mitigate losses.

No one wants a Knight Trading excursion....

Re: Billing systems are a nightmare for engineers

#282
post #259

Wait until you get into the complexities of taxation. If you think you know them, pay attention to https://twitter.com/aotearoa_ben/status/1526786701750050817 . That's a law that changes the tax rate if 1. The purchase happens in Texas. 2. The payment cleared in a specific 2 day period. 3. The item cost Seriously, calling out just one example, https://comptroller.texas.gov/taxes/publications/98-490/scho... points out…

Just do what eBay does and just charge sales tax on everything!

Re: Billing systems are a nightmare for engineers

#283

Earlier quoted context omitted.

We should demand governments to maintain and provide an API for their tax codes. Let them have skin in the game. If the taxes are incorrect, businesses can point out that it’s the government API’s fault. Completely developed in the open, and with full test coverage. This should be required to collect taxes. No API? No taxes. API down? Tax waived.

“We” the engineers (working for the government) still have to develop those APIs and the backends that power them. The only way to reduce the pain instead of just shifting it around would be to massively simplify the source of truth - tax codes and laws.

Yes, I think that's the point.

Re: Billing systems are a nightmare for engineers

#284
I am so fucking exhausted with the content marketing on Hacker News. It’s not that it has no value. It’s not that there isn’t a place for ‘developer evangelists’. It’s not about this piece. I’m just sick of it.

I come here for a refuge from manipulation- a place where people can share and debate things on their own merits. Content marketing is a not-so-sly way to insert one’s business interests into these types of conversations I enjoy for the purposes of driving metrics, sales, and series A’s.

I hear that taxation and billing and collection are complex. Try to implement WA State destination based sales tax for digital only goods. Where is the relevant tax district? It doesn’t align with zip codes or congressional districts. Municipalities move and reshape the landscape like rivers do. Is a billing address representative of the location of the purchasing party for tax purposes? We took this to a tax judge in 2014, and their final response was ‘do your best’.

I would love to read a blog post with such a war story- about parsing the tax rate soap API into a relational database that can not slow down a checkout page. About how time zones affect rate calculations. Where rate file updates accidentally modified past transactions and how to model data to prevent that. I don’t want to hear something is hard so you should buy my services. Not here. Not on a call to my cell phone. Not ever.

Business leaders need to determine which complexity they want to their developers to tackle- what is the most valuable for profit growth and risk mitigation. If the audience is business leaders, appeal to them directly, and take it somewhere else. If it’s to appeal to software developers, it shouldn’t be attached to ulterior motives. We see through it and we resent it. To the extent that we have influence over purchasing decisions, I’m likely to punish companies who regularly engage in this behavior.

Content marketing is different than creating useful content as a marketing strategy. I’ll raise Digital Ocean as an example. Their sysadmin content is top notch, and I’m happy to give them business for it out of gratitude. That is my decision. Nobody is trying to convince me of how to invest my or my company’s resources.

We get it. Auth is hard. SMS is hard. Billing is hard. None of it is core to most companies core business. If you really want to make your point, show me some code to prove it. Or spend your content budget on something that helps people. Just don’t think you’re going to win me over with a sales piece on HN. You’re not. I’ve already forgotten your name, and if it does come up I’ll have nothing but a negative memory to recall.

Sorry not sorry.

Re: Billing systems are a nightmare for engineers

#285

Earlier quoted context omitted.

We should demand governments to maintain and provide an API for their tax codes. Let them have skin in the game. If the taxes are incorrect, businesses can point out that it’s the government API’s fault. Completely developed in the open, and with full test coverage. This should be required to collect taxes. No API? No taxes. API down? Tax waived.

Why would you do that when you could just lobby the government to make the tax code even more complex, then sell a service to handle that complexity for you under the threat of jail time if you get it wrong?

You're being facetious but I don't think this is a radical idea. Government already publishes the tax code in English language. This is just formalization of the tax code in computer code: More precise, testable and provable.

Re: Billing systems are a nightmare for engineers

#286
post #259

Wait until you get into the complexities of taxation. If you think you know them, pay attention to https://twitter.com/aotearoa_ben/status/1526786701750050817 . That's a law that changes the tax rate if 1. The purchase happens in Texas. 2. The payment cleared in a specific 2 day period. 3. The item cost Seriously, calling out just one example, https://comptroller.texas.gov/taxes/publications/98-490/scho... points out…

I worked on a tax app. Total nightmare. I remember having to adjust tax rate for a couple parishes in Louisiana and a city in Florida for example. Trying to come up with a readable, testable, way to get that done was something I tell ya.

similar. worked on invoice app having to apply tax, and working with existing foxpro(?) tables that were in postgresql. Trying to reverse engineer without having access to original code, and make things work "like they used to". Someone manually pulled down some free tax thing once per month, but there were so many exceptions that people knew about that were just hardcoded in to the code that I had no access to that I could never make it "just work".

We transitioned to using an external tool (taxjar, IIRC, but might have been something else). Was a pain to feed them data to get back tax data, and.. so many exceptions and exemptions I had to learn about. Weeks later I get "all these numbers are wrong".

I dug in and went through logs.

"no, these are right. taxjar is adding x% on ABC and shipping".

"We don't charge tax on shipping".

"Well, taxjar is doing it, because it's how you're supposed to do it in this state".

"We've never charged tax on shipping"

"Well... you've probably been non-compliant for years then".

I think when they'd started 'computerizing' this back in the early 90s, shipping costs weren't taxed. Or... (IIRC) the amount of shipping cost taxed was proportional to the amount of taxable goods being shipped in the state (vs out of the state) and when they started, what they were shipping wasn't mostly taxable (like... some of the main items were taxable, but the supplies weren't, or something similar). And... if they were shipping to a non-taxable entity (non-profit) then the in-state shipping charge wasn't taxable, but they were supposed to pro-rate it based on the proportional distance in the target state, if that state charged tax on shipping, then track that and remit to that appropriate county/state authority.

These were some of the rules that a variety of people had tried to describe to me both what they thought was supposed to happen and what they thought the original software was doing, but... they could never find 2 examples to line up to confirm or justify those explanations.

Another example: certain items (chemicals) were taxable in some counties and not others, and might be taxed differently based on whether they were being 'used' by technicians vs delivered to a customer (again, different counties had different rules - and some of these rules were indeed confirmed by digging through taxjar and their support and state agency websites).

When this company started, it was one location in two counties in one state, and as they grew, the specifics grew (and also changed yearly) and what they should do became lost to everyone.

Moving things to an external hosted tax-as-a-service system was supposed to 'simplify' things, but it just introduced a lot of turmoil and headache, because routine numbers people were used to for years were suddenly replaced with "new" numbers which no one trusted.

Re: Billing systems are a nightmare for engineers

#287

Earlier quoted context omitted.

We should demand governments to maintain and provide an API for their tax codes. Let them have skin in the game. If the taxes are incorrect, businesses can point out that it’s the government API’s fault. Completely developed in the open, and with full test coverage. This should be required to collect taxes. No API? No taxes. API down? Tax waived.

“We” the engineers (working for the government) still have to develop those APIs and the backends that power them. The only way to reduce the pain instead of just shifting it around would be to massively simplify the source of truth - tax codes and laws.

The US tax system is the legislative equivalent of spaghetti code / big ball of mud.

Re: Billing systems are a nightmare for engineers

#288

Earlier quoted context omitted.

A credit note. How the ** do you handle it in the US without issuing credit notes in your bookkeeping?

We issue a credit note* * Except (these aren't the right thing to do, but I've seen it in the wild many times): - When someone in sales issues an invoice with a negative amount on line 3. Hey, if I take payments with invoices, why not give back? - When someone agrees to settle up by providing free services and throws it on the next bill.

> When someone in sales issues an invoice with a negative amount

I worked briefly with a tax-saas, and to handle refunds I just... did a negative amount. It worked! Except.... I hadn't looked closely. Their API removed the negative. A charge of -$7.92 was just a charge of $7.92. Their docs indicated "we don't accept negative numbers - use a refund transaction instead" but... the API accepted the negative number, then changed it to a positive, and kept running. No error code returned. Really really poor experience, and I hope they've fixed that.

Re: Billing systems are a nightmare for engineers

#289

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…

>And every country does it differently

Seems like the real world is just choc-full of Liskov Substitution Principle violations :P

Re: Billing systems are a nightmare for engineers

#290

Earlier quoted context omitted.

Why would you do that when you could just lobby the government to make the tax code even more complex, then sell a service to handle that complexity for you under the threat of jail time if you get it wrong?

You're being facetious but I don't think this is a radical idea. Government already publishes the tax code in English language. This is just formalization of the tax code in computer code: More precise, testable and provable.

What makes you think that this is being facetious?

https://www.propublica.org/article/inside-turbotax-20-year-f... has a good overview of how companies that provide software for calculating taxes guarantee a market for their products by keeping the process of calculating taxes more complicated than it needs to be.

Post reply on HN