That card transaction fee is also imposed on debit cards, because the banks and other cousins got the go-ahead to do so from our elected officials.
It is required that the added cost to the consumer is communicated. Sometimes it’s transparent as in signs at every gas pump asking for acknowledgment before dispensing gas, and the two rows of pricing on the lit up signs by the side of the road.
They’re posted in most other establishments that pass it on as required, usually as a sticker on the the card machine, but I’ve also encountered it without signage, asked, and it’s validated verbally if the buyer notices and asks…after finding it in the printed receipt, and by then it costs more in time than disputing it is worth (Add eyeroll). It’s even charged at thrift shops…
I prefer to pay cash and save $5-10 cents a gallon and also the fees when buying food and clothing, but it’s not always possible.
It became a “thing” when the issue of “banking fees for everything” in unregulated amounts became a political conversation. That was addressed, but this fee was added, and it’s netting the $$ dealers at least as much (or more) than the previous legalized ponzi practices.
Once it’s become legal the only way to avoid it is to pay cash or make it illegal again…and I’ve seen signs in “cashless” establishments they’re charging fees on cash as well, and choose not to frequent them at all.