For food, most places will accept cash here. Hell, even a bookstore near me won't accept cash anymore.
I also saw that places like gas stations "pre pay" if I select debit, trying to hold $60-$100 from my bank account until the final transaction comes back.
While this hasn't happened to me, I've read that if your debit card is compromised or if a charge back is required, you would have to fight your bank to get your money back and it's a bit easier with credit cards.
The ones run by younger people are very credit-card-first, love not dealing with cash, etc. They usually have one of those Stripe iPad things. If you do pay with cash, they'll get a bit flustered because it breaks their flow.
The ones run by older people are either cash-only or try hard to disincentivize customers from using credit cards, sometimes with signs guilting customers about how much money card companies take from businesses.
It really feels like a generational thing depending on what people are used to. The older shop owners remember when cards were a lot more rare, and they've seen their swipe fee expenditure go up over the years. While the younger owners have only ever lived in a credit card oriented world and just bake the swipe fees into their prices from the beginning.
If the store was extending you credit (ie leave now with the goods and in the future pay us back) they’d be required to accept cash at that point.
That said, there are laws in some jurisdictions against card-only payment policies. I suspect they're not widely enforced for smaller places.
There is no federal statute mandating that a private business, a person, or an organization must accept currency or coins as payment for goods or services.
(There are some specific local laws; generally though it appears not to be the case that you have to accept cash.)
Article I, Section 10, Clause 1:
No State shall enter into any Treaty, Alliance, or Confederation; grant Letters of Marque and Reprisal; coin Money; emit Bills of Credit; make any Thing but gold and silver Coin a Tender in Payment of Debts; pass any Bill of Attainder, ex post facto Law, or Law impairing the Obligation of Contracts, or grant any Title of Nobility.
Variously interpreted, that part about states can't make their own currency may be tangentially important.
Using a credit card is always cheaper to the merchant, maybe the merchant doesnt realize it but cash is a bad deal like Uber is a bad deal - They money is up front so you never realize the costs. In the case of user, it is fuel, vehicle wear and tear, and shifting demand.
In the case of cash, it is the cost of counting and keeping the drawer, security, deposits, change, and internal training/theft. Most estimates show it to be ~10-20% of income of a business is wasted. Always less than the cost of credit.
Well...that is...if you didn't do what maybe 50% of small businesses do: Screw the taxpayer. Sure, these credit card companies take 3%. Many small businesses take cash so they can do cash accounting and keep "money in" away from the IRS. They dont report it, they pay workers with it under the table and you, the customer and tax payer, may pay less, but you are getting screwed.