Uber has admitted to an accounting mistake that deprived tens of thousands of New York City drivers of millions of dollars in earnings since November of 2014.

On Tuesday, a representative of Uber told Gothamist that the company failed to account for New York's sales tax and injury compensation fee in calculating the commission they take from drivers—a direct violation of the terms of service agreement, which specifies that the commission be based on net fare, not gross fare. That error allowed the company to take 2.6 percent more in commission from drivers, amounting to a profit of tens of millions of dollars.

Uber has promised to refund the money, plus interest, for an average payout of $900 per driver. The representative would not divulge the total cost of the error, but the Wall Street Journal estimates they'll owe up to $45 million —not exactly a bank breaker for a company that generated $6.5 billion in revenue last year.

"We made a mistake and we are committed to making it right by paying every driver every penny they are owed, plus interest, as quickly as possible," Rachel Holt, regional general manager of Uber in the U.S. and Canada, said in an email. "We are working hard to regain driver trust, and that means being transparent, sticking to our word, and making the Uber experience better from end to end."

A spokesperson for the company said that Uber discovered the discrepancy recently, and that there were no previous complaints about it as far as they knew. However, the Taxi Workers Alliance did make note of the "unlawful deductions" in a class action lawsuit filed against the company last summer.

"The Agreements plainly did not permit Uber to take the taxes and BCF surcharge amounts entirely from the Driver's portion, on top of the Service Fee that Uber states will be the only deduction from Driver-earned fares," the lawsuit said. "By so doing, Uber violated the Agreement to Plaintiff's detriment."

The Uber representative told Gothamist that the company did not see the TWA's initial claims about the unlawful deductions, but has since been made aware of it.

The admission comes as Uber fends off a number of controversies at the corporate level, including allegations of widespread sexual harassment, a criminal probe into their use of software to trick government officials, and an unflattering video showing their chief executive Travis Kalanick arguing with a driver about dropping fares.

In New York, drivers have told the Times that the fare cuts imposed by Uber have drastically reduced their pay, with some complaining of a 33 percent take-home hit. And in January, the company was accused of breaking a taxi strike during the protests against Trump's travel ban at JFK, leading to a #DeleteUber campaign convincing more than 200,000 people to ditch the app.