Used to be, but in most stares it is perfectly legal now.Last I heard, charging a fee to use a CC was not legal. Like gun laws though, only the law abiding seem to take notice.
Are credit card surcharges legal?
Though the practice of surcharging was outlawed for several decades, a class action lawsuit in 2013 permitted merchants in several U.S. states to implement surcharges in their businesses. This lawsuit started a chain reaction over the next several years with more and more states adopting a pro-surcharging stance. Proponents of surcharging have argued that anti-surcharging laws drive up prices for goods and services across the board, and in some cases may even be a violation of the First Amendment.
As of March 2021, most U.S. states allow merchants to surcharge on credit card transactions, with only Colorado, Connecticut, and Massachusetts having laws against surcharging.