Children sometimes put hundreds of dollars on their parents' credit cards without permission and thousands of complaints were made, the U.S. Federal Trade Commission said on Thursday in announcing the settlement.
The agreement was similar to a $32.5 million settlement reached with Apple Inc in January.
Google said that it implemented changes in March 2014 that made it clearer when real - as opposed to virtual - money was being spent. And it said that it allowed consumers to choose whether they wanted to be prompted to enter a password with each purchase, as a way to head off unauthorized charges by children.
"We're glad to put this matter behind us so we can focus on creating more ways for people to enjoy all the entertainment they love," said a Google spokeswoman.
In the Apple settlement, it agreed to refund to customers at least $32.5 million in unauthorized charges made by children and to change its billing practices to require consent from parents for in-app spending.
The FTC has alleged that the companies were too lax in allowing children playing some app games to ring up charges on their parents' credit cards to buy pricey digital goods.
In the game Air Penguins, for example, children can buy virtual fish costing $49.99 to feed virtual penguins living on virtual melting ice caps.
"Children could rack up charges just by tapping on pop-up boxes," said FTC Chairwoman Edith Ramirez, adding that Google's staff pointed to what they called "family fraud" or "friendly fraud" as a leading source of refund requests.
Google first began offering in-app charges, as the virtual purchases are known, in 2011 without requiring any password or taking other steps to ensure that the parent approved of the child's charges, the FTC said.
In 2012, Google began asking for the credit card holder's password before allowing the purchase. But, granting permission for one purchase would open a 30-minute window where children could make purchases without re-entering a password, the FTC said.
Initially, Google urged unhappy parents to take up the issue with the app developer, the FTC said.
Google shares were about 1 percent higher in afternoon trading on Thursday.
© Thomson Reuters 2014