Apple will refund $32.5 million to consumers to settle a federal case involving purchases that kids made without their parents' permission while playing on mobile apps, the U.S. government announced Wednesday.

The Federal Trade Commission said Apple will make full refunds for any such in-app purchases made by kids while playing on mobile phones and other devices, and incurring charges without parents' knowledge or permission.

The commission said it had received tens of thousands of complaints about unauthorized charges.

Edith Ramirez, the agency's head, said the settlement only involves children's mobile apps and charges racked up when kids bought things such as virtual currency or dragon food.

In some cases, Ramirez said, charges ran into the hundreds and even thousands of dollars.

The FTC said the apps included a 15-minute window in which passwords were not needed to make purchases, but that Apple did not inform users about the glitch.

Apple is the world's most valued company as measured by market capitalization. The company sold $171 billion worth of product worldwide in fiscal 2013.

Last November, the website used the latest quarterly earnings information to calculate how much the world's top-earning tech companies made in revenue every second. The website found that Apple made about $4,540 in revenues per second, meaning it would take just under two hours for Apple to earn back the $32.5 million it has agreed to pay out in the apps settlement.

With files from CBC News