D.C. Attorney General Karl Racine brought charges against DoorDash on Tuesday, accusing the company of pocketing tips meant for workers and misleading customers about where their money was going.

Racine is seeking to recover millions of dollars in tip money customers paid through DoorDash over two years under its previous model, which the attorney general's office called "deceptive."

In a statement, a DoorDash spokesperson said: "We strongly disagree with and are disappointed by the action taken today. Transparency is of paramount importance, which is why we publicly disclosed how our previous pay model worked in communications specifically created for Dashers, consumers and the general public starting in 2017. We've also worked with an independent third party to verify that we have always paid 100% of tips to Dashers. We believe the assertions made in the complaint are without merit and we look forward to responding to them through the legal process."

The charges follow an investigation Racine's office launched in March which found DoorDash used customers' tips to offset the company's payments to workers. A report from Recode at the time explained that DoorDash offers its delivery workers a guaranteed amount they will be paid for an order before accepting, but later subsidizes that amount with tips customers pay through the app. Rather than serve as a bonus for workers, the report said, customer tips went to DoorDash to offset workers' base pay.

"Any reasonable consumer would have expected that the 'tip' they added to the delivery charge through the DoorDash checkout screenflow would be provided to the Dasher on top of the payment promised by DoorDash for the delivery. But during the relevant time period, that was not the case," according to the lawsuit, using DoorDash's moniker for its workers. "Instead, DoorDash used consumer tips to subsidize the Guaranteed Amount payment it promised to Dashers."

The lawsuit alleges DoorDash's disclosure about its tipping model was "ambiguous, confusing, and misleading because it encouraged consumers to tip, but did not disclose that a consumer's tip would, in the vast majority of circumstances, make no difference at all to a Dasher's pay and would only go toward subsidizing DoorDash's share of Dasher pay."

Here's a screenshot of the tipping feature in Doordash that was included in the lawsuit:

DoorDash said over the summer that it was changing its tipping model after public backlash so that "Every dollar customers tip will be an extra dollar in their Dasher's pocket, and customers will be able to tip at checkout or after the delivery."

A spokesperson for Racine's office said it is the first attorney general's office to take action against DoorDash.

DoorDash is not the only gig economy company that has faced backlash for its tipping policies. An NBC News report in February said Instacart used a similar practice to subsidize worker pay with tips up to the guaranteed $10 per-job minimum. The company changed its policy after a petition from workers.

Subscribe to CNBC on YouTube.

WATCH: Postmates CEO: The food delivery space is not a winner-take-all market