Amazon.com Inc. (AMZN) - Get Report  , Wayfair Inc. (W) - Get Report or Overstock.com Inc. (OSTK) - Get Report likely aren't popping corks today.

Brick-and-mortar retailers and states, though, may be as they are both catching a break.

In a reversal for Wayfair, the online furniture vendor and others of its ilk, the Supreme Court on Thursday, June 21, ruled 5-4 in favor of South Dakota in South Dakota v. Wayfair Inc., which addressed whether online vendors must collect state sales tax on online purchases made through their sites.

Shares of Amazon (1.3%), Wayfair (1.6%), Overstock (7.2%) and Etsy Inc. (ETSY) - Get Report   (1.8%), which sells items from smaller vendors, closed trading down on Thursday.

"The decision was expected," Oliver Wintermantel, an analyst at MoffettNathanson LLC, said Thursday. "It was an overhang and headline risk. That's out of the way now."

Central to the case was whether e-tailers must collect state sales tax on purchases made through their sites even if the companies lack a so-called nexus in a state, such as having a warehouse or store there. In Thursday's decision, the Supreme Court upended its 1992 ruling, Quill Corp. v. North Dakota, that had held sway over tax collection. 

"The concern for retailers like Wayfair is that their prices will now effectively rise across many states," said Neil Saunders, GlobalData Retail managing partner, via email. "This weakens one of their competitive advantages over both physical players and those larger online and omnichannel retailers which have more of a national presence. However, in our view, this outcome is fair. It means that retailers will now compete on a level playing field."

Brick-and-mortar retailers have long complained that they were losing business to online retailers that didn't collect sales taxes on purchases. Government entities, such as South Dakota in this case, have missed out on sales tax dollars through retailers such as Wayfair, which lack physical presences in most states.

Led by Justice Anthony M. Kennedy, the majority vacated a state ruling in the Wayfair case and remanded the case for further proceedings.

"Because the physical presence rule as defined by Quill is no longer a clear or easily applicable standard, arguments for reliance based on its clarity are misplaced," Kennedy wrote. In forceful language, he said Quill had distorted the nation's economy and that it and another case, National Bellas Hess Inc. v. Department of Revenue of Illinois, involving a mail-order reseller, had caused states to forego annual tax revenue of between $8 billion and $33 billion.

"In effect, [Quill] is a judicially created tax shelter for businesses that limit their physical presence in a state but sell their goods and services to the state's consumers, something that has become easier and more prevalent as technology has advanced," Kennedy noted.

He was joined in the majority by Justices Clarence Thomas, Ruth Bader Ginsburg, Samuel A. Alito Jr. and Neil M. Gorsuch. Chief Justice John Roberts wrote a dissenting opinion, in which Justices Stephen Breyer, Sonia Sotomayor and Elena Kagan joined.

The decision in favor of South Dakota potentially hurts both Wayfair and Overstock because they both sell big-ticket items such as furniture, which would come with hefty sales taxes if bought at a brick-and-mortar retailer. That's also true with electronics such as those sold by a third respondent in the case, online retailer Newegg Inc., owned by Chinese-listed Hangzhou Liaison Interactive Information Technology Co. Ltd.

Wayfair could suffer more than Overstock because its customers tend to earn less and are more price-sensitive, but both e-tailers could lose business that would limit their ability to expand beyond current offerings.

"There's some headwind for Wayfair," Wintermantel added, "but not massive."

Others that come up short in the ruling are small third-party vendors that sell their wares through services such as Amazon's Amazon Marketplace.

"The losers from the ruling are online-only retailers, especially smaller players, and consumers who will end up paying more for products. By our calculation, the additional costs for consumers could be up to $15.2 billion a year," Saunders added.

Amazon collects state sales tax where applicable on its own merchandise, but it doesn't generally assess it on items shoppers purchase from third parties via the Marketplace. The exceptions are Pennsylvania and Washington, for which it does collects sales tax on third-party Marketplace purchases made by customers living in those states. Analysts therefore predicted that even a Supreme Court decision in favor of South Dakota would have only a negligible impact on Amazon.

Image placeholder title

Wintermantel said that charging sales tax on online purchases wouldn't typically affect whether consumers buy products via e-tailers or traditional brick-and-mortar stores. After all, Wintermantel said, his firm has polled consumers and found they value selection, price and convenience first. Avoiding sales tax only ranks sixth or seventh in importance.

Besides, consumers are more or less used to paying sales tax for online purchases these days. That's because Amazon, the world's largest e-tailer, already collects such taxes on all items it sells from its own stock to consumers in the District of Columbia and 45 states that charge sales taxes.

Experts said, however, that a larger implication of Thursday's Supreme Court ruling is that it sets the stage for states to pass individual laws on collecting sales tax from out-of-state online vendors.

Amazon, Overstock and Wayfair support a single federal rule to govern such taxes, rather than interpreting a collection of state and local tax laws. Bills to address this situation in Congress so far have failed to gain traction.

In a statement, Wayfair said: "We welcome the additional clarity provided by the court's decision today. Wayfair already collects and remits sales tax on approximately 80% of our orders in the United States, a number that continues to grow as we expand our logistics footprint. As a result, we do not expect today's decision to have any noticeable impact on our business, as it may on other retailers who do not currently collect and remit sales tax."

Jonathan Johnson, a board member for Overstock, said the company would comply with any outcome, which will be determined by lower court proceedings, and predicted it would have no "appreciable impact" on the business.

"To lessen the potential impact of today's ruling on internet innovation, Congress can, and should, pass sound legislation allowing states to accomplish their aims while still permitting small internet business to thrive," he said.

Overstock noted also that what's challenging for internet startups is that there are more than 12,000 different state and local taxing districts.

Etsy's CEO Josh Silverman responded to the ruling by saying: "While today's decision is not the one for which we advocated, the Supreme Court did acknowledge the important difference between big internet retailers and the creative entrepreneurs on our platform. This opens the door for Congress to act and create a simple, fair federal solution for microbusinesses. We will continue to stand with our community of two million Etsy sellers. We urge Congress to thoughtfully consider today's decision and to act swiftly and in the best interest of the microbusinesses they represent." 

Amazon did not immediately responded to requests for comment.

4 Top Experts Tell You How to Play the Market. TheStreet's Scott Gamm recently sat down with top market watchers from Bank of America, Fisher Investments, Invesco and Wells Fargo. Register to watch a free roundtable in which they lay out their best advice.