Apple will refund millions of dollars to consumers after allowing kids to make purchases in apps without their parents' consent.

Apple will pay at least $32.5 million, after reaching a settlement with the Federal Trade Commission Wednesday.

FTC Commissioner Edith Ramirez said that Apple (AAPL) failed to notify parents that once they enter their Apple passwords for children to buy virtual items for games on their iPhones and iPads, they leave open a 15-minute window during which children can make additional and unlimited in-app purchases without additional parental authorization. These charges generally range from 99 cents to $99.99 per in-app charge.

Ramirez said the window allowed children to run up millions of dollars of charges on apps including "Dragon Story" and "Tiny Zoo Friends." One consumer complained to the FTC that her daughter had spent $2,600 in the app Tap Pet Hotel, according to Ramirez. Others reported that their kids had racked up as much as $500 in in-app purchases.

Related: 25 apps you should download right now

Apple has agreed to provide full refunds to consumers who have been affected, Ramirez said. Apple has emailed consumers who may have been impacted by unauthorized charges, but Ramirez said consumers can also reach out to Apple if they believe they have been affected.

"This settlement is a victory for consumers harmed by Apple's unfair billing, and a signal to the business community: whether you're doing business in the mobile arena or the mall down the street, fundamental consumer protections apply," Ramirez said in a statement. "You cannot charge consumers for purchases they did not authorize."

Apple said protecting children has always been a top priority for the App Store.

"Today's agreement with the FTC extends our existing refund program for in-app purchases which may have been made without a parent's permission," the company said in a statement.

If the refunds do not reach $32.5 million, Apple will be required to pay the balance to the FTC.

Prior to the settlement, Apple already modified its billing practices by notifying parents of the 15-minute window and giving them the option to cancel at any time.

Apple has also already settled a class action lawsuit with parents who said the company's policy let their children rack up charges without their permission.

--CNN's Rene Marsh contributed to this report.