What this means for other states, and the people who shop in them, is still unclear. There are 31 states that currently have laws that tax internet sales. But these laws may be more restrictive than South Dakota’s law, and so may not hold up in court. In the majority opinion, Justice Kennedy lauded South Dakota’s law as one that is designed not to impose “undue burdens” on interstate commerce. “This ruling is not a blank check for states,” Joseph Bishop-Henchman, the executive vice president of the Tax Foundation, wrote in an analysis of the ruling. States will now likely revisit their laws and try to model new bills after South Dakota’s so they can begin collecting sales tax on online purchases; some, including Vermont, Indiana, North Dakota, and Wyoming, have already passed laws similar to the one on the books in South Dakota. Congress now also may weigh in; it had previously been restricted by Quill from passing any sort of sweeping law. An amicus brief filed by four U.S. Senators argued that Congress has been unable to “reach a consensus” on a legislative solution, in part because of Quill.

The ruling could be a huge boon for states that have recently struggled to bring in enough revenue. An estimate by the Government Accountability Office found that state and local governments could have collected about $8 billion to $13 billion last year alone if they could require sales tax from all remote sellers. But it may also lead to new court cases as states try to get aggressive in passing wider sales-tax rules. Massachusetts, for instance, has argued that companies have a physical presence in the state if users store “cookies” on their computers to buy their goods.

The ruling will not make a difference for shoppers who use certain sites; in many Amazon purchases, for instance, the company already collects sales tax because it expanded its fulfillment centers and offices so rapidly that it has a physical presence in most states. But Amazon does not currently collect sales tax for items bought through its third-party sellers, which are stores that use Amazon to sell goods, but that take care of fulfilling orders and providing customer service on their own. Third-party sellers make up about half of all goods sold on Amazon, the company has said. This may be why President Trump has focused some of his criticisms of Amazon on the sales-tax issue, tweeting in August that “Amazon is doing great damage to taxpaying retailers.” (Two states, Washington and Pennsylvania, do currently collect sales tax on behalf of third-party sellers.)

Third-party sellers on Amazon, and other merchants that have not been collecting sales tax in states where they don’t have a presence, are now scrambling to figure out what various states say about collecting sales taxes, and how to collect them. This could be a costly proposition for small merchants who sell across the country but who haven’t had to invest in tax attorneys before.