We research all brands listed and may earn a fee from our partners. Research and financial considerations may influence how brands are displayed. Not all brands are included. Learn more.

Money; Getty Images

How many times have you tried to pay with a credit card only to be told: "There's a surcharge for credit card transactions."

You might have even wondered if credit card surcharges — in which customers are charged an extra 3% or so when paying by credit card — are even legal. The answer depends on where you live.

Where credit card surcharges are illegal

Until recently, credit card surcharges had been illegal in 10 states and Puerto Rico. However, a recent court case in New York struck down its ban on credit card surcharges, permitting merchants to add these to your bill. Similarly, the ban was lifted in states such as California, Texas, Florida, Oklahoma and Maine.

This leaves Kansas, Colorado, Massachusetts, Connecticut and Puerto Rico as the only remaining places in the U.S. where it's still illegal for merchants to impose a credit card surcharge.

For example, STOP Fraud Colorado, the website for the Colorado Attorney General's Office, explains, "Under Colorado law, it is illegal for any merchant to impose a surcharge on a purchaser or lessee who elects to use a credit or charge card in lieu of payment by cash, check, or similar means." However, the site does say that surcharges are permitted when charged by state or local governments that accept credit cards.

How to know if there's a credit card surcharge

Credit card payment networks like Visa, Mastercard, American Express and Discover permit participating merchants to impose credit card surcharges, when allowed by law. However, they place multiple restrictions on this practice.

Understandably, Visa, for example, officially opposes surcharging as a practice, because it penalizes cardholders from using their preferred method of payment. Merchants that choose to impose surcharges are required to notify Visa at least 30 days in advance of implementing the policy.

Furthermore, merchants are required to create signage at the point of entry and point of sale, alerting customers about credit card surcharges, and they must itemize the surcharge on transactions. Finally, the surcharge must not exceed the merchant's cost of accepting the credit card. American Express, Mastercard and Discover all have similar requirements for merchants that choose to impose surcharges on their customers.

What happens in practice

I recently visited a merchant in my home state of Colorado to pay for a service I ordered over the phone. Only once I pulled out my credit card did the merchant object to my form of payment and tell me it would be adding a 5% surcharge to the transaction. I tried to inform him as politely as possible that such a surcharge is against Colorado law, and besides, merchant fees are about 2% to 3% of the transaction, about half of the surcharge he was requesting.

He claimed that 5% was what his credit card processor, Square, charges him. However, he must have been misinformed, as Square's website indicates that it charges just 2.65% for card present transactions like the one I was making. In response, the merchant reluctantly agreed to remove the surcharge from the transaction.

Is it fair for merchants to impose credit card surcharges?

Many merchants complain about the fees they incur when accepting credit cards as payment, and that's understandable. From the consumer's standpoint, credit card merchant fees are just another cost of doing business. Other costs include real estate, energy, labor, taxes, insurance, raw materials and necessary equipment.

It's unclear why some merchants single out credit card fees as necessary for imposing a surcharge, although some merchants will add surcharges for energy, labor, health insurance and other costs. These practices are particularly egregious in the rental car and telecommunications industries. In the airline industry, the practice of imposing fuel and other surcharges became so outrageous that the Department of Transportation outlawed the practice of adding any kind of surcharges to advertised airfares.

Besides, there are also costs associated when a store accepts cash or checks as payment. Cash can be easily stolen or just go missing, while a percentage of checks received will always be returned for insufficient funds. Both require labor to count and deposit. For many merchants, the cost of accepting cash or checks turns out to be similar to credit cards in the long run; otherwise there wouldn't be so many merchants accepting credit cards. In fact, since the COVID-19 pandemic many merchants are now only accepting credit and debit cards — and they're not accepting cash.

Finally, most consumers would clearly prefer that a business include all of its cost of doing business in the price it advertises, and not be penalized for paying with one form of payment or the other.

A better option than surcharges

While surcharges may or may not be legal or within the rules of the payment network, there's a similar option that's always acceptable. Merchants have always had the option to offer a cash discount on the advertised price. This way, consumers will never pay more than the advertised price, regardless of which method of payment that they choose.

Bottom line

While credit card surcharges are legal in most states, businesses would be wise to limit use of them, as they risk alienating customers. Shoppers will always judge for themselves if they think a business practice is unfair, and can choose to shop elsewhere. Then it's up to business owners to decide if gaining a few percent on one sale is worth losing out on many additional sales in the future.

More From Money:

Best Credit Card Deals of 2020

How to Tell if a Credit Card's Annual Fee Is Worth It

A Couple of the Best Cash Back Credit Cards Are Getting Even Better Rewards