Printed on US currency you will find "THIS NOTE IS LEGAL TENDER FOR ALL DEBTS, PUBLIC AND PRIVATE". Some businesses have refused to accept larger bills for a long time, as other forms of payment have become more popular, some refuse cash completely. In what cases can a business refuse to accept cash?
The Federal Reserve website notes that creditors must accept cash for debts on services already rendered, but that businesses may refuse cash for services not yet rendered unless prohibited by local law.
The Treasury website includes examples of businesses limiting what cash they will accept:
For example, a bus line may prohibit payment of fares in pennies or dollar bills. In addition, movie theaters, convenience stores and gas stations may refuse to accept large denomination currency (usually notes above $20) as a matter of policy.
You have to take legal tender to settle a debt. If your business model doesn't involve the customer incurring a debt that is then settled, you don't have to take cash. For example, in a restaurant where you pay after eating, you can insist on paying cash, because you're settling a debt. But in McDonald's they can refuse your cash at the counter, because you've not received your food yet and so no debt has been incurred.
They don't have to take cash if they reasonably told you in advance they don't take cash, because they made fair effort to prevent you from incurring a debt.
They don't have to take cash if the transaction hasn't yet happened (not a debt) or if it can be easily undone at no cost to either party - such as a newspaper subscription they can just stop delivering.
Both of these reasons are limited by the rules against discrimination, see below.
They don't have to take cash if it's impracticable. For instance a transit bus when fares first went to $1.00, it took years to fund new fareboxes able to take paper money. You don't have to take a mortgage payment in pennies. Liquor stores don't have to take $100 bills. (it requires them to keep too much change in the till, which makes them a robbery target).
Trouble arises when it appears there's an ulterior motive for the rule. Suppose a Landlord Jim requires rent to be paid with EFT. Rent-controlled Marcie tells the judge "It's a scheme to oust me, he knows I'm unbanked". Jim counters "No. I got mugged last month because criminals know when I collect cash rents." It will turn on whether Jim can show good-faith effort to work with his unbanked tenants to find other ways to pay. If Jim does a particularly bad job of this, he could find himself paying Marcie's legal bills!
Even worse if the ulterior motive is discrimination. Chet the plumber hates Muslims. Alice the feed supplier hates the Amish. So they decide to take credit cards only, knowing those people's religions don't allow them. Their goose is cooked once they can't show any other reasonable reason to refuse cash.
Apartment complexes have had a long history of not accepting cash for payment of rent. This eliminates the problem of robbery and strongly reduces the risks of embezzlement.
THIS NOTE IS LEGAL TENDER FOR ALL DEBTS, PUBLIC AND PRIVATE
Article 1, Section 10 of the US Constitution states:
No State shall ... make any Thing but gold and silver Coin a Tender in Payment of Debts
Previous editions of banknotes stated that the notes were redeemable in gold or in lawful money. The Mint Act of 1792 set gold and silver as legal currency (and that one did not have to accept "base metal coins" for more than $10 which is why coin rolls only go up to $10). The Coinage Act of 1873 dropped silver and made gold the legal standard for currency. In 1933, the "redeemable in gold" was changed by federal statute and the legend you mention was added. Prior to 1933, someone could demand that you pay them in gold and not with a bank note. Legislation in 1933 ended that. This clause in the Constitution leads some political groups to wish to return to a gold standard. I recommend reading the book Greenback as it describes how our currency got the way it did and why that clause appears on currency.
A business can refuse cash (paper currency) payment pretty much in all cases provided it's a reasonable policy and/or notified during/in advance of contracting. Details in this link.
"all United States money as identified above are 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 for payment for goods and/or services."
Even if the payment is being made to settle a debt or other obligation, the creditor may refuse payment if their rationale is reasonable (as determined by the courts).