Amazon has told third-party sellers that it will soon start collecting sales tax on shipments to Pennsylvania. Starting April 1, "Amazon will calculate, collect, and remit sales tax for orders shipped to customers" in Pennsylvania, the company said in its seller central portal, which is only available to marketplace merchants. An Amazon spokesperson confirmed the policy. Pennsylvania is just the second state, following Amazon's home state of Washington, that's part of a new service called "Marketplace Tax Collection," which CNBC reported on in November. Lawmakers in Pennsylvania passed a bill last year requiring internet retailers to charge and collect sales tax, leveling the playing field for physical stores.

Amazon is being forced to adapt to a new legislative clampdown on online sellers as more retail transactions move to the internet and states seek to recoup tax revenue. Since 1992, sales over the internet have not been subject to tax unless the merchant has a physical presence in the state of the customer. The Government Accountability Office estimated in a report late last year that state and local governments could have gained up to $13 billion in 2017 from taxes on remote sales.

The new law in Pennsylvania requires sales tax collection regardless of whether the merchant has a physical operation in the state, so if a small clothing business in Atlanta sends a dress to Philadelphia, it now has to charge and collect the 6 percent sales tax. To date, Amazon has collected tax on items that it sells but has left it to third-party merchants on the platform to handle their own tax collection where applicable. In addition to Washington and Pennsylvania, states including Colorado and South Dakota have passed laws compelling the collection of internet sales tax. On the seller central page, Amazon said that merchants don't have to take any action or pay any fees for the company's automated service, and added that there is "currently no option to opt-out" or ability to "restrict sales to specific states for tax reasons." Whether more states follow suit may be in the hands of the U.S. Supreme Court. Starting in April, the high court is scheduled to hear arguments from officials in South Dakota who contend that the 1992 ruling is no longer effective given the changing state of the economy. — CNBC's Eugene Kim contributed to this report.

WATCH: Mnuchin questions Amazon's taxes on marketplace