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.
Private businesses are free to develop their own policies on whether to accept
cash unless there is a state law that says otherwise.If you pay before (ex. grocery store), they can refuse to accept certain payment methods.
If you pay after (ex. restaurant), you've already eaten the food and now you owe a debt.
United States currency is legal for all debts public and private (it says so on the notes), but that doesn't mean it's required to be accepted for all debts.
Restaurants that require payment before providing food have more flexibility.
So I think you’re right, even though it sounds like a minor distinction.
But a restaurant bill generally isn't going to be a 'debt' in that sense... if they only take credit cards and you don't have one after already eating your food, they're just going to write it off and ban you from the premises.
Say that officially your steak costs one million dollars, but if you pay electronically, you get a discount down to 20 dollars.
If you want to pay in cash, that will be one million dollars, please.