I don't like immigration officers taking 20$ extra on a visa that is supposed to be 40$. I can find round trip flights to visa free destinations for not much more than that
I went to a few exchanges in Pattaya before going for the trip, can't really find any crisp banknote under 100$ denomination. I tried to pay usd at the border but they didn't accept my notes because small stamp in the corner