Well, cash is "legal tender" which is meant to pay off debts. So you consumed some product that you owe, I think they're obligated to accept cash to settle debt even if they didn't want to. But I don't know the nuances of this too well.
https://www.bankofcanada.ca/banknotes/about-legal-tender