President Donald Trump’s tweet earlier Wednesday alleging that Amazon.com Inc. does not pay what he calls “internet taxes” is off the mark.

In fact, the company today collects sales taxes in every state that has such a tax — that’s 45 states or commonwealths plus the District of Columbia. Five states — Alaska, Delaware, Montana, New Hampshire and Oregon — don’t have a sales tax.

In the past, Amazon AMZN, +2.49% was aggressive in fighting to ensure that online purchases remained tax-free. The company benefited from tax rules obliging retailers to collect sales tax only in those states in which they have a physical presence, or “nexus,” such as a store or warehouse. But the company dropped that resistance in recent years after greatly expanding the number of distribution centers, warehouses and data centers that it operates across the U.S. to improve delivery times.

Amazon offers a full explanation of its sales-tax policies on its website.

Don’t miss:Meet Amazon’s first customer — this is the book he bought

One loophole that continues to irk lawmakers is that third-party vendors who sell products on the Amazon platform are not subject to sales tax, although that is expected to change. At least eight states, including New York, are introducing or considering measures to force Amazon and other online retailers to collect sales tax from their third-party vendors or to force sellers to report their own sales, according to the National Assocation of State Budget Officers, as the Wall Street Journal has reported.

That is expected to disrupt the operations of smaller retailers, in particular, who are not currently equipped to track where their goods are bought and sold or how to deal with the tax implications when items are returned.

Amazon shares were up 0.5% Wednesday and have gained 31% so far in 2017, while the S&P 500 SPX, +1.59% has risen about 9%.

In case you missed it: Every time this happens, Amazon crushes another legacy retailer

Amazon is buying Whole Foods: What you need to know

Also: How Amazon came to dominate books, electronics and the cloud