HARTFORD — Amazon said on Monday that it has agreed to collect Connecticut’s sales tax, ending a two-year dispute over the tax that the online retailer had previously refused to charge.
The retailer also promised to spend $50 million to build an order-fulfillment center at an unspecified site and create hundreds of jobs.
Kevin Sullivan, commissioner of Revenue Services, said that Amazon will generate about $8 million in the first year it collects the tax and $13 million to $15 million in the second year.
By agreeing to collect the tax, Amazon puts pressure on other Internet businesses to pay Connecticut’s 6.35 percent sales tax, Sullivan said.
‘‘Obviously, we will turn our attention to them in no particular order,’’ he said.
Amazon will begin collecting the tax on Nov. 1 at the start of the busy Christmas holiday shopping season. The company previously insisted it was not obligated to abide by the state’s Internet tax law because it does not have a physical presence in Connecticut.
It announced in December a similar agreement to collect sales tax in Massachusetts also starting Nov. 1. And last April, Amazon reached an agreement with Texas officials to settle a sales tax dispute by expanding operations in the state and starting to collect sales taxes.
Amazon now supports changes in federal law ‘‘that would finally resolve the sales tax issue, level the playing field for all retailers, protect states’ rights and allow states to collect the revenue owed,’’ Paul Misener, an Amazon vice president, said in a statement on Monday.
Under federal law, a state or local government cannot force a company to collect sales tax on a purchase unless the business has a physical presence in the state.
Congress is considering several bills that would force companies to collect the tax.