Full stop. Credit cards provide a service and that service isn't free. It gets factored into prices.
https://www.merchantmaverick.com/the-complete-guide-to-credi...
I'll add that Visa charges 1.43% - 2.4% of the transaction. I'd be curious to know what the cost of a cash transaction is as a percentage of the transaction. I doubt it climbs that high.