Account wise, merchant fees are an expense taken out of revenue, not out of profit. The fee is a cost on goods sold. Merchants care because by contract it causes them to inflate the price of all products, they're disallowed from explicitly showing the customer the fee as a line item, even though it has the same effect on price as a tax.
Most merchants would prefer the buyer have more information about why something costs what it does. Ergo the cash and debit card buyer would have no such fee on their receipt; someone with an ordinary credit card might have a 3% fee, and someone with a high kickback card might have a 5% fee. Rather than permitting freeloaders.