As Bangkok is a cosmopolitan city, you won't have any problem paying by card in the majority of the shops, restaurants and hotels. It's only when you go to smaller shops and more local places like street food stalls, a local market or getting tuktuks, it's useful to have cash in your pocket.