NEW YORK (AP) — Congress is considering legislation that would give states the ability to require out-of-state retailers to collect sales taxes. If the measure passes, consumers would lose a loophole that has resulted in years of tax-free online shopping. Out-of-state merchants would have to collect statewide sales taxes on Internet, mail-order and other purchases — as well as any county and local sales taxes. Why is this necessary? And what will this mean for your online purchases?

Here's a guide:

Q. Don't I already pay sales taxes on Internet purchases?

A. Sometimes. Some retailers already collect sales taxes for where you live, but many don't and haven't been required to do so.

In 1992, the U.S. Supreme Court ruled that states can't force businesses elsewhere to collect those taxes unless the company has a physical presence in that state — such as a physical retail store or an office. Retailers that operate in one or a few states typically collect taxes only for those states and not others.

Q. Why haven't retailers collected the taxes anyway, if they are already collecting them for some states?

Retailers argue that it's complex to keep track of state, county and local taxes in thousands of jurisdictions across the nation. It's not just the different rates, but different rules on what products are and aren't taxed. Some states exempt clothing, for instance, and some charge taxes only when the price is above a certain amount. Bubble gum might be considered candy in one state and a tax-exempt food item in another.

Out-of-state retailers don't emphasize this, but not having to collect the taxes also makes their products cheaper, compared with in-state retailers that have to.

Q. So if the Supreme Court settled this, why is Congress getting involved?

There was hardly any online commerce when the Supreme Court issued its ruling two decades ago. These days, states believe they are losing out on billions of dollars in revenue collectively each year. They have been pressuring Congress to change the law, as they face budgetary constraints in funding schools, roads and other services.

The argument that it's a mess to keep track of thousands of tax rates and rules also has diminished with the advent of better software. Many national retailers have figured out how to collect those taxes. Under the bill before Congress, states would have to provide merchants with software to manage this. They also would have to designate a single office within the state to handle all out-of-state tax collections, so merchants wouldn't have to figure out where to send county and local tax payments.

Q. Will this make Internet purchases more expensive?

Legally speaking, it shouldn't. That's because when you buy something from a retailer that doesn't collect sales taxes for your state, you're supposed send in the taxes owed yourself.

In practice, though, few people do that, and enforcement is poor. This bill would effectively close that loophole and have the retailer collect the taxes for everyone.

That said, even with the sales tax, buying from an Internet retailer might be cheaper than going to a physical store, which has such expenses as rent, utilities and cashiers' wages.

Q. What happens next?

A. Nothing right away. Senate approval is just one step. It needs passage in the House and President Barack Obama's signature.

After that, individual states would have to choose to participate. So if New Jersey doesn't participate, for instance, then a retailer operating only in Oregon would not be bound to collect state, county and local taxes for New Jersey.

Under the current legislation, merchants that sell $1 million or less worth of goods to residents of a certain state would not have to collect taxes on that state's behalf.