WASHINGTON — Consumers nationwide would pay more for what they buy online if South Dakota gets its way before the U.S. Supreme Court in a case to be argued Tuesday.

The justices will decide whether to overturn 50 years' worth of rulings that forbid states from imposing sales taxes on whatever their residents buy from out-of-state retailers. Ending the ban could bring billions of dollars in new revenue to the states.

President Donald Trump gave the issue renewed visibility when he tweeted in early April that Amazon pays "little or no taxes to state & local governments." That wasn't correct: The company has collected taxes since April 1, 2017, on sales to customers in the states that have sales taxes, even though it is not legally required to do it.

By contrast, the online store at Trump.com, the official website of the Trump Organization, collects sales taxes only for purchases made by customers in Florida, Louisiana and Virginia.

In 1967, the Supreme Court ruled that states could not force mail-order catalog companies to collect sales taxes unless a buyer lived in a state where the company had a physical presence — a retail store, a headquarters or a distribution center, for example. The court reasoned that the volume of mail-order business was minor compared to in-store sales and that catalog companies would face too big a burden in having to figure out the correct sales tax, given widely different rates around the company.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

But South Dakota concluded in 2016 that the explosion in online sales changed the market drastically. So it passed a law requiring all but the smallest retailers, including internet companies, to collect taxes on the sales they make in the state, even if they had no physical presence there.

Lower courts blocked the law, relying on the Supreme Court precedents, and the justices hear the state's appeal on Tuesday. A total of 35 other states have weighed in on South Dakota's side.

Online companies "are far more present in the South Dakota economy than most of the state's physically present retail businesses," says Eric Citron, a Washington lawyer representing the state. "The internet now makes it possible for out-of-state sellers to reach consumers with engaging, interactive virtual storefronts in our homes or on our smartphones at any hour of the day."

As for the burden of dealing with thousands of tax rates across the country, the state says software programs now make it possible for a retailer to instantly compute the correct sales tax simply by entering a buyer's ZIP code.

Times have changed, Citron says, and the court's earlier reasoning no longer applies. "Amazon.com did not begin selling books out of Jeff Bezos's garage until July 1995, and Bezos himself described Amazon as a pipsqueak in comparison to Barnes & Noble."

But the internet companies that sued to block the law — Wayfair, Overstock and Newegg — say in their Supreme Court filings that state sales tax systems "remain inordinately complex and burdensome during the internet era, just as they were before it began."

The number of local tax jurisdictions has doubled to 12,000, the companies say, and local laws vary widely on what goods are subject to sales taxes. During back-to-school tax holidays, for example, some states exempt clothing, but others don't. Some include shoes, and the definition of what qualifies as school supplies varies widely.

Forcing internet retailers to pay sales taxes everywhere would stifle competition and make it much harder for start-ups to get into the market, the companies say. In a friend-of-court brief, eBay says taxing internet sales would place "crushing burdens on small online businesses, causing many to curtail operations and damaging the national economy."

And besides, the companies argue, while e-commerce is growing rapidly, it still accounts for only about 9 percent of all retail sales — a smaller share than catalog companies had when the Supreme Court exempted them from paying sales taxes in states where they had no physical presence.

The companies also note that the largest internet retailer, Amazon.com, now pays sales taxes in all the 45 states that collect them. That leaves out only Alaska, Delaware, Montana, New Hampshire and Oregon. Some local communities have sales taxes in Alaska and Montana, but they are not levied statewide.

South Dakota estimates that the states could pick up a combined $34 billion a year if the court allows them to tax internet sales. But the General Accounting Office estimates that the number would be at most about $13 billion.

The Supreme Court has never held that a sales or use tax can be imposed on a retailer who sells to a customer who lives in a state where the company has no physical presence. The justices will issue their decision in this case by late June.