E-commerce has taken the world by storm, transforming the retail industry and forcing traditional brick-and-mortar retailers to either adapt in order to survive, or go out of business. Shoppers have grown to appreciate the convenience of going online to buy things, and online retailers have largely been willing to absorb the costs of shipping in lieu of the massive investments in real estate and salespeople involved in maintaining a physical store network.

From the beginning of the internet, one lure of e-commerce was that shoppers often didn't have to pay sales tax. Despite complaints from state governments, as well as from traditional retailers, past court rulings that went all the way to the Supreme Court had upheld the ability of internet retailers not to have to pay sales taxes in most of their transactions. But that all changed today, with the highest court in the nation revisiting and reversing its past jurisprudence. The ramifications for e-commerce giants and their customers are immense and far-reaching.

Supreme Court from street level, with view of steps leading up to the building, just before sunset.

Image source: Getty Images.

Why e-commerce has largely escaped sales taxes until now

The history of the battle between state governments and online retailers is long. In Quill Corp. v. North Dakota, the Supreme Court heard a case involving attempts from North Dakota's tax commissions to force office-equipment company Quill Corp. to collect use tax on behalf of its North Dakota-resident customers. Quill argued that it didn't have any connection to North Dakota, including having no offices, store locations, or employees within the state. Citing a case from the 1960s that had upheld a retailer's right not to have to pay sales tax when the only contact it had with a given state was mailing goods to customers located there, Quill said it shouldn't be subject to the state sales and use tax laws.

The Supreme Court held in favor of Quill, establishing what's now called the physical presence test. According to the decision, in order for a state to impose sales or use tax requirements, a retailer must have a physical presence, such as an office, store location, warehouse, or employees, within that state.

Effectively, that means that online retailers were largely able to avoid responsibility for collecting sales tax in nearly every state in which they did business. The state in which the online business is incorporated would always have the right to collect sales tax from that business, because the corporate headquarters would represent sufficient physical presence. But elsewhere, all but the biggest online retailers can generally structure their businesses to avoid physical presence, especially in key markets where sales tax can be particularly onerous.

Why the Supreme Court reversed itself

Earlier in 2018, the Supreme Court took the opportunity to revisit the issue in a case involving online furniture retailer Wayfair (NYSE:W). South Dakota v. Wayfair, Inc. involves a fact pattern similar to Quill, with the South Dakota state government seeking to enforce a state law allowing collection of sales tax on online retailers with sales of more than $100,000 or more than 200 different transactions to South Dakota online shoppers.

South Dakota pulled no punches in its efforts before the high court. It admitted that it couldn't distinguish itself significantly from the situation in Quill but argued that the previous decision should be overruled. It also got the support of the National Retail Federation, which asserted that having different rules for e-commerce and traditional retail essentially gave online retailers an unfair advantage. Numerous groups filed briefs in support of Wayfair's position, including several competing e-commerce retailers, as well as pro-taxpayer advocacy groups.

The Supreme Court's 5-4 decision agreed with South Dakota's position. Rejecting the idea that it shouldn't revisit its previous decision, the majority called the physical presence test "unsound and incorrect" and overturned Quill. In dissent, four justices believed that as part of interstate commerce, online sales taxation should be left to lawmakers in Congress rather than allowing states to impose a patchwork of piecemeal requirements on e-commerce companies.

What Wayfair means for you

With the decision, online shoppers need to prepare for an onslaught of sales taxes on their e-commerce purchases. That's nothing new for many internet shoppers, since industry leader Amazon.com (NASDAQ:AMZN) has long been big enough to have to collect sales tax in multiple states, and as it's built out a more comprehensive distribution network, its physical presence has only expanded. That was likely a big part of Amazon's decision last year to collect sales tax for all 45 states that have such taxes.

Now, though, smaller e-commerce players are likely to have to follow suit and start collecting sales tax as well. That'll put a burden on their compliance departments, and their customers won't have as much incentive to shop with them versus going with a larger e-commerce company like Amazon.

It'll take some time for states to ramp up their efforts to collect sales tax from online retailers. But if you've relied on internet purchases to avoid sales tax -- and ignored the use-tax obligations you've incurred in doing so -- you'll almost certainly see higher costs in the near future.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Dan Caplinger has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon and Wayfair. The Motley Fool has a disclosure policy.