All of the studies I've seen estimate the total costs of accepting cash being between 30% and 104% of the cost of accepting credit.
This review of three studies between 2003 and 2010 is the best summary I've been able to find on the Internet Jump to page
In my estimation (not being an economist myself) is that yes there are costs to doing business in cash, but those are mostly fixed costs. If a store doubles their sales in cash, the fees and time spent handling the cash on the back office will increase, but not by much. Credit, on the other hand, is open ended. Costs rise nearly as fast as sales totals increase.
For small retailers who tend to rack up a large number of small transactions, A $10 credit charge will typically see 10 cents or so plus 2% of the charge amount in fees. That's 32 cents or 3.2% of the transaction fee in charges. (That is a generous example. Many credit agencies have harsher rates.) That is comparable to the cost of handling cash for these small transactions
With larger transaction sizes, cash looks even better to the retailer than credit, as the cost for accepting and handing a $40 transaction are not significantly greater than for a $10 transaction. There may be more trips to the bank or a marginally greater deposit fee, which are typically very small. But with a credit transaction, credit processing fees scales from 32 cents in my previous example to 90 cents, nearly tripling.
The best payment method for the retailer is debit card because it passes the transaction costs on to the customer. Debit cards also pass the risks of fraudulent transactions to the consumer, so most people should avoid them if they can.