Good news for parents of overzealous gamers: you may have a refund coming.

Federal regulators announced a lawsuit against Amazon Thursday, accusing the retail giant of illegally charging parents for millions in gaming purchases by their kids.

The Federal Trade Commission says Amazon (AMZN) allowed kids to make purchases of virtual items like "coins" and "stars" in Kindle Fire games without their parents' consent, a violation of federal law. Amazon earns 30% on all such purchases.

The FTC complaint quotes internal Amazon communications in which employees raised concerns about allowing unlimited in-app charges without requiring a password. One employee said the policy was "clearly causing problems for a large percentage of our customers," calling the situation a "near house on fire."

"Amazon's in-app system allowed children to incur unlimited charges on their parents' accounts without permission," FTC Chairwoman Edith Ramirez said in a statement. "Even Amazon's own employees recognized the serious problem its process created."

Apple (AAPL) reached a settlement with the FTC over the same issue in January, agreeing to refund $32.5 million to parents whose kids made unauthorized purchases through iPhone and iPad apps. The company also settled a related class-action suit.

Related: J.K. Rowling is latest victim of Amazon-Hachette fight

The FTC doesn't yet have an estimate for the total unauthorized charges in the Amazon case, but said the figure is in the millions of dollars. One woman, for example, told the agency that her daughter had racked up $358.42 in purchases without her knowledge.

The lawsuit seeks full refunds for all those affected. Amazon revised its policy on in-app purchases last month to require consent from account holders, the FTC said.

Amazon said in a letter to the FTC that the lawsuit was "deeply disappointing." The company says it has already refunded some purchases following complaints from parents.

"In-app purchasing was and remains a new and rapidly evolving segment, and we have consistently improved the customer experience in response to data," Amazon said, adding that its policy already meets the standards of the one Apple imposed following its settlement.