Or at least nicely told to go and exchange it for real money (local currency) somewhere, then come back and try again. :)
Here are a few cherry picked examples
https://www.reuters.com/world/americas/half-payments-caracas...
https://www.tripadvisor.com/ShowTopic-g293974-i368-k4798488-...
https://www.voanews.com/a/lebanon-leans-on-us-dollar-to-cope...
Mexico, Costa Rica, Panama, Nicaragua, Belize, and Colombia are places where I’ve done this personally and lots of Europeans were doing the same.
Friends and family in Costa Rica even advised that local currency wasn’t necessary and suggested bringing crisp bills from my bank.
But now that you point out "developing countries", that does seem more likely. :)
If it's in advance of giving you your coffee, no, they could demand you pay in dogecoin only if they wish.
(In small towns it may be more difficult, but not impossible, specially if you are nice.)
And your specific comment that started this didn't read like you are only argued about developing world. My 2c.