NEW YORK (CNNMoney) -- Visa, MasterCard and a group of other large financial firms agreed Friday to forfeit a total of $7.25 billion to settle a massive anti-trust case brought by retailers.
Visa (V, Fortune 500) said in a statement that its share of the settlement is $4.4 billion; MasterCard will pay $790 million.
The defendants in the case, which also include large banks like JPMorgan (JPM, Fortune 500) and Bank of America (BAC, Fortune 500), will offer cash payments worth $6.05 billion in total. In addition, Visa and Mastercard will reduce "swipe fees" -- fees paid by merchants to issuers when cards are used -- while they implement new rules for such transactions, according to a statement from law firm Robbins Geller Rudman & Dowd, which represented plaintiffs in the case.
The value of this reduction, the firm said, is roughly $1.2 billion.
As part of the agreement, retailers will soon be able impose a surcharge for credit card transactions, subject to a cap and disclosure. Such surcharges will also apply to cardholders from other networks, like Discover and American Express.
This change will likely go into effect in 2013, Visa said.
In addition, merchant groups like drug stores will be able to negotiate swipe fees collectively with Visa and MasterCard.
"We believe settling this case is in the best interests of all parties," Visa CEO Joseph Saunders said in a statement. "We are comfortable with the terms, which we do not anticipate will impact our current guidance."
MasterCard (MA, Fortune 500) general counsel Noah Hanft said that while the company has "strong defenses to all claims," the settlement "avoids years of litigation and uncertainties that are inherent in such cases."
The settlement is still subject to court approval.
The case centers on allegations that Visa, MasterCard and some of the country's largest banks conspired to unlawfully fix swipe fees for merchants. The settlement was reached on behalf of a class of roughly 7 million U.S. merchants who accept Visa and MasterCard credit cards and debit cards, according to Robbins Geller Rudman & Dowd.
Shares of Visa and MasterCard were up roughly 2.5% in after-hours trading Friday following the announcement.