Cash is legal tender for all debts public and private.
So there’s that.
I believe (and I will be corrected if I am wrong), that cash can be used to settle a legal debt created by a transaction. BUT, I think that a business is able to refuse to do the transaction if a given form of money is not to his liking.