The fight over how much is fair to charge to process a credit-card transaction has proven to be an epic, years-long, dog-eat-dog brawl. And there's no end in sight.

Throwing the latest punch, Wal-Mart filed $5 billion antitrust lawsuit against Visa this week. Wal-Mart claims the credit-card giant's processing fees, which it pays every time a shopper uses a credit or debit card, are unfairly high.

The lawsuit argues that a lack of competition in the credit-card processing space is hurting Wal-Mart's bottom lines and its customers’ wallets.

Processing fees, also called interchange fees or swipe fees, are a significant source of revenue for credit-card companies. The National Retail Federation (NRF) has estimated that the fees generate $30 billion for Visa and MasterCard each year.

Depending on Wal-Mart’s relative success in court, Visa could end up paying three times that $5 billion sum, according to a market research report from Sanjay Sakhrani, an analyst covering Visa for financial services company Keefe, Bruyette and Woods.

Sakhrani says Visa knew this lawsuit was coming because Wal-Mart chose not to be part of a larger class-action lawsuit filed by the National Retail Federation in 2005. “We would view Wal-Mart’s lawsuit against Visa as not surprising given they opted out and this follows similar lawsuits from other large merchants who have opted out of the Merchant Litigation settlement,” Sakhrani said in an analyst note published this week.

Visa declined to comment on the lawsuit.

Other larger retailers, including Target and Macy’s, also opted out of the class-action lawsuit so that they could pursue their own case against the credit card giants.

Separately, while merchants are negotiating a years-long claim with Visa and MasterCard over antitrust issues, the retail industry is also locked in a battle with the Federal Reserve over what should be the legal cap on debit card swipe fees.

In July, merchants thought they had scored a win when U.S. District Court Judge Richard Leon declared that the Federal Reserve was "non-compliant with Congress's clear mandate" when it set a cap for fees in debit-card transactions in 2011. Leon argued that a 21-cent cap on debit card swipe fees was too high.

But last week, Leon’s ruling was overturned, leaving the Fed’s cap on debit-card swipe fees at 21 cents -- much higher than the retail industry lobbied for.

“NRF is disappointed and remains confident that the Federal Reserve erred when it set the swipe fee cap far higher than intended by Congress,” NRF Senior Vice President and General Counsel Mallory Duncan said, in a statement released after the court decision was released. “The Fed ignored congressional intent and worked to shield debit card companies and big banks. A self-described victory for the banks usually results in higher costs for consumers.”