Under an agreement reached Monday with the Justice Department, Visa and MasterCard will let shopkeepers reveal processing fees to customers and offer discounts to those using cards that carry lower fees.

Until now, shops and restaurants had been forbidden to tell customers about the fees – or to offer discounts or rebates to people paying with cards carrying lower merchant fees. The agreement will take effect as soon as it gets judicial approval, probably within a few months. The lawsuit and settlement were filed in federal court in New York.

"We want to put more money in consumers' pockets, and by eliminating credit card companies' anticompetitive rules, we will accomplish exactly that," U.S. Attorney General Eric Holder said at a press conference. "The companies put merchants and their customers in a no-win situation."

Restraints on retailers by the payment networks "impose a competitive (straitjacket) on merchants, restricting decisions by them to offer discounts, benefits and choices to customers that many merchants would otherwise be free to offer," the Justice Department said in its lawsuit against Visa, MasterCard and American Express.

The agreement came as part of a lawsuit filed Monday against the major credit card companies by the federal government and several state attorneys general for anticompetitive practices. MasterCard and Visa settled, but the third card company, American Express, refused to sign on to the agreement.

"Our attitude is that this is bad law, bad economic policy," American Express spokesman Michael O'Neill said. "We don't think there is anything in it for consumers."

He said rather than passing along any discount to customers, merchants are just as likely to keep any savings on fees for themselves. (American Express's other argument: It's too small to be included in an anticompetition lawsuit. According to the Justice Department, American Express accounts for 24 percent of all credit card spending in the U.S., compared to MasterCard's 27 percent and Visa's 43 percent.) 

For years shop owners have complained that credit card companies put the squeeze on them by charging as much as 5 percent of the value of each purchase every time a card is used. (A no-frills card might cost a merchant 2 percent, but cards with benefits, such as those that offer airline miles, will set a merchant back some 5 percent.) Merchants pay about $35 billion a year in fees to credit card companies, according to the Justice Department. For some small companies, the fees add up to be the biggest expense after employees and rent.

"Merchants, small and large, welcome today's news," said John Emling, senior vice president of government affairs for the Retail Industry Leaders Association, in statement. "Credit and debit networks operate within a broken market where a few dominant firms set fees and dictate terms with impunity."

Josh Floum, general counsel for Visa, said in a news release that allowing merchants to offer discounts based on the cost of fees is "a reasonable accommodation."

The company already allows businesses to offer discounts to customers who pay cash or use debit cards that take the cash straight out of their accounts.

Because American Express did not settle, the lawsuit against the company will continue.

"We have no intention of settling the case," American Express chief executive Kenneth Chenault said in a statement. "We will defend the rights of our card members at the point of sale and our own ability to negotiate freely with merchants."