5 ms·
A single sales tax rate alone is only a (small) part of the equation: some classes of goods are taxed differently (e.g. raw food vs. cooked meals, fast food, al
by niftich 10y ago
A single sales tax rate alone is only a (small) part of the equation: some classes of goods are taxed differently (e.g. raw food vs. cooked meals, fast food, alcohol), and different jurisdictions levy additional taxes that may vary inside a geographic area. There are city/town taxes, county taxes, state taxes, and sometimes, additional tax overlay districts where the money goes to some specific fund for an improvement.
So you'd want to be able to specify the class of product and a very fine-grained geographical location as inputs to your function, with the hopes that it will produce an accurate and preferably unambiguous result.
- theandrewbailey 10y agoSales tax APIs are complicated, because sales taxes are complicated. As mentioned, they vary with little reason or boundary, and for different types of product. E.g. Ohio doesn't tax food (unless eating at a restaurant), and (I think) NJ doesn't tax clothing. I work in e-commerce, and it's just easier to have the client sign with a third party tax service who knows what they're doing and drop in their library, than try to figure it out yourself and risk the lawyers and tax people.
- codegeek 10y agoyes, good point. It cannot be that simple for sure. States like NY make it even more complicated when there are additional tax rates for cities such as NYC. Lot of factors to consider.