Our online sales-tax system has relatively few defenders, aside from those in the hardline anti-tax crowd who’d support anything that made it harder for the government to collect revenue. If you buy something from a local store, the store collects any applicable sales tax and sends it to the state. If you buy something online, and the store has no physical presence in your state, a tax still applies—but the business doesn’t have to collect it or tell your state how much you spent. To avoid the tax, all you have to do is “forget” your online purchases when you fill out your tax forms at the end of the year.

Not only does the system facilitate tax evasion, but it twists economic incentives, giving online retailers an unfair advantage. Until now, federal lawmakers have struggled to find a solution. But a new proposal from Rep. Bob Goodlatte (R-Va.) might point the way forward.

Unfortunately, the issue does need to be handled at the federal level. Online purchases that cross state lines are pretty much the textbook definition of “commerce … among the several states,” an area the Constitution gives to the national government. The Supreme Court has confirmed this, forbidding states to unilaterally tax businesses that lack a physical in-state “nexus.” Such taxes can be collected only if Congress explicitly authorizes them.

Decades into the internet era, lawmakers haven’t managed to do so. “Tax increases”—which in this case, of course, just means shutting down a tax-cheating scheme—are always unpopular, and e-commerce giants like Amazon long fought any attempt at reform. But the tide may be turning. Many states are facing budget crises, and others are taking matters into their own hands, passing laws of dubious constitutionality in an attempt to force the Supreme Court to revisit the issue. And in a hilariously brazen display of crony capitalism, Amazon itself switched sides a few years ago.

(The ever-expanding Amazon currently collects sales tax in 28 states containing 84 percent of the U.S. population—its warehouses and affiliates programs can create a “nexus” through which states can insist on tax revenue—so it’s starting to have a problem with the fact that many other retailers don’t.)

The tricky thing about interstate commerce, though, is that multiple states are involved. In the system the federal government sets up, should the business’s state or the customer’s be the one to handle taxes?

Many conservatives are drawn to the idea of taxing sales through the business’s state (the “point of origin”). This makes life easy for businesses, because they deal only with the state where they’re located. But it creates a risk that online retailers would simply flock to the handful of states without sales taxes, once again creating a system where (in all the other states) purchases from local stores are taxed while online purchases are not. This time, the economically perverse arrangement would be legally sanctioned.

To some, this “tax competition” is a feature, not a bug. But it’s not clear why states should set their tax rates at the level most attractive to businesses, as opposed to individuals. True, individuals are more likely to accept higher tax rates in exchange for better services—but even if that’s not the tradeoff conservatives prefer, it’s one they should leave to voters and states, rather than guaranteeing everyone in the country access to tax-free shopping no matter what tax rates they voted for in their own states.

Further, businesses don’t really pay taxes; they just pass them on to their customers. So there’s also a strong argument that customers are the ones who deserve representation on the legislatures setting the rates.

Yet there is a problem with taxing these sales where the customer lives, too. Online retailers would need to keep track of many different sales-tax systems: one for each state (except the few with no sales tax), plus some for localities as well.

This concern is somewhat overblown; the liberal economist Dean Baker once claimed to have sent a note to Amazon’s CEO “telling him that my 6th grade neighbor can help him design the spreadsheet.” But only somewhat. While modern technology makes it easy to match a tax rate to a customer’s address, many states have complicated ways of drawing the line between what is taxed and what is not, with food being a popular exemption. Previous proposals, such as the Marketplace Fairness Act, struggled to address this problem in a plausible way.

Enter the new idea from Goodlatte. Under his scheme, to answer the question of which items are exempt from taxation, businesses would just look to their own state’s laws. But the tax rate on each order would be determined by the state where the customer lives. Revenue would be collected by origin states and then distributed to destination states through a “clearinghouse.”

Unfortunately, things get complicated when it comes to states that refuse to participate in the clearinghouse or don’t have a sales tax. In the latter case, for example, as Curtis Dubay and James Gattuso of the Heritage Foundation recently summarized, the options are for retailers to “1) collect tax based on an alternate tax base (defined as the base in the state where the seller has the most gross receipts) and apply the buyer’s home state rate … or 2) report information about the sale to the buyer’s home state.”

Certainly, we can debate these finer details. But in general, this is a clean and simple way of combining the major advantages of both systems. States can collect sales taxes from their residents at whatever rate those residents voted for, and businesses are saved from the rigors of learning countless convoluted tax schemes.

Robert VerBruggen is managing editor of The American Conservative.