If you pay after receiving a service, then you could loosely be considered in debt. Usually, that doesn't hold enough water from what I read and it really means, until you go to court and have an established debt, you're forced to pay through whatever mechanisms were agreed to in the transaction. Only then does it have to be payable by cash.
It's interesting to me because the transactions you're most likely to have cash on hand and pay for are items most would never have to go in debt for (a coffee, lunch, etc.) whereas large transactions you may need to go in debt for ideally use some other non-cash medium (loan, cashiers check, etc.).
Basically makes cash useless (why I rarely carry more than say $50 anymore).
More interestingly, you'll see businesses adapt quickly to accept cash when their electronic payment/management system goes down for a day. They're incredibly resourceful when it's convenient for themselves. I've had this happen at a coffee shop that was cashless that suddenly decided they'd accept cash when the other option was to not make money.
Banning specific reasons for not making business is possible however (it is done to protect ethnic minorities for example), so the situation can probably easily be changed by legislation that bans "wants to pay in cash" as a legit reason for not entering into a transaction at stores that are open to the general public.
Q. Is it legal for a business in the United States to refuse cash as a form of payment?
A. Section 31 U.S.C. 5103, entitled "Legal tender," states: "United States coins and currency [including Federal reserve notes and circulating notes of Federal reserve banks and national banks] are legal tender for all debts, public charges, taxes, and dues."
This statute means that all United States money as identified above is a valid and legal offer of payment for debts when tendered to a creditor. There is, however, no Federal statute mandating that a private business, a person, or an organization must accept currency or coins as payment for goods or services. Private businesses are free to develop their own policies on whether to accept cash unless there is a state law which says otherwise.
Link: https://www.federalreserve.gov/faqs/currency_12772.htm