Internal Facebook documents released as part of a class action lawsuit reveal that the company made millions of dollars from children playing Facebook games and spending their parents’ money, but did little to fix the problem.

Reveal reported on Thursday that Facebook was aware for years that children playing games on Facebook would regularly spend large amounts of real money on games such as Angry Birds, PetVille and Ninja Saga, often without realising that they were spending money at all.

Facebook conducted an internal analysis of its game revenue in 2011, the documents show. The internal Facebook report found that children spent $3.6m (£2.7m) on games between October 2010 and January 2011.

One 15-year-old unwittingly spent $6,500 on Facebook games in two weeks in 2013, internal Facebook documents show. A Facebook employee said in the document that the child’s request for a refund should be refused.

Facebook even developed its own term to refer to children unwittingly spending their parents’ money on Facebook games: “Friendly fraud.”

The social media business also referred to children who spent large amounts of money as “whales” - the same term used by casinos to refer to high-spending gamblers.

Despite realising that the social media business had a problem with children spending millions of dollars on its games, Facebook was hesitant to solve the issue.