A California restaurant can offer a $5 sandwich for $4.90 to customers who pay with cash but until recently state law prohibited it from offering a $4.90 sandwich and adding a 10-cent surcharge for customers who paid with credit card. Either results in a $4.90 sandwich for cash payers or a $5 sandwich credit card payers, so it may surprise retailers to learn that so-called surcharge bans are common across several states and were once federal law.

There are several reasons why retailers care about whether they may add surcharges. Those reasons have caused retailers to challenge California’s and New York’s surcharge bans. And now state and federal courts—including the U.S. Supreme Court—are chiming in on the debate.