The Consumer Financial Protection Bureau has fined two of the three largest credit-reporting agencies in the country for misrepresenting the scores they sold to consumers. TransUnion and Equifax were ordered to pay a combined $17.7 million in refunds and $5.5 million in fines.

CFPB spokesman Sam Gilford said Tuesday that both credit bureaus violated portions of the 2010 Dodd-Frank financial reform law by:

In addition, Gilford said, Equifax inserted ads for its credit scores in AnnualCreditReport.com — a central source of free credit reports — in such a way that consumers could not access their free credit reports without viewing the ads. That is a violation of the Fair Credit Reporting Act, he said.

About 700,000 TransUnion consumers were affected, dating back to July 2011, according to Gilford. He did not immediately have customer numbers for Equifax, but said the affected period was from July 21, 2011, to March 20, 2014.

Both companies were ordered to disclose the cost of credit-related products and how they will be billed; provide a simple mechanism for consumers to cancel the service; and clearly disclose that the score is “not likely to be the same score used by lenders or other commercial users for credit decisions.”

Equifax and TransUnion have 60 days to file a plan for complying with the order; after that, consumers will be notified by mail about how to get a refund.

Consumers once had to pay for scores in most cases. Today, free credit scores are offered routinely by personal finance websites and banks and other financial institutions in an effort to build customer loyalty and repeat visits.

Most free scores are a VantageScore — developed jointly by the three major credit bureaus — rather than FICO. NerdWallet, for example, offers a free VantageScore 3.0, which is calculated on data from TransUnion credit reports. Some banks and credit card issuers, however, offer a free FICO score to their customers.

Both FICO and VantageScore are calculated from information in your credit reports, and are heavily influenced by whether you pay on time and keep balances well below your credit limits. Because scores from both sources move in tandem, experts generally recommend that consumers use a free score — the same score, consistently —  if the goal is simply to monitor or build credit.

But the source of the score matters more when big financial decisions such as mortgage approvals are made.

Liz Weston, a certified financial planner and NerdWallet columnist, says it’s easy to get confused: “People often don’t understand that the scores they’re seeing aren’t necessarily the ones used by lenders. Most lenders use some version of the FICO credit scoring formula, but FICOs come in many different versions and iterations. There are different generations of FICO scores and formulas tweaked for different industries, such as credit cards or auto loans.”

Weston says there are times when it makes sense to pay for a specific FICO score. “If you’re in the market for a major loan such as a mortgage or auto loan, you should consider buying the appropriate FICOs from MyFICO.com to get the clearest idea of where you stand.”

Bev O’Shea is a staff writer at NerdWallet, a personal finance website. Email: boshea@nerdwallet.com. Twitter: @BeverlyOShea.

The article Credit Score Companies Must Refund $17.7 Million to Customers originally appeared on NerdWallet.