Our Airasia flight had a layover at Bangkok on way to Chiang Rai. No one (website or phone call or whatsapp) from the airlines could tell us if the immigration would be done at Bangkok or Chiang Rai. And the staff on ground did not know!!! Anway , here are some tips:
1. If you have a layover on way to another city in Thailand, you need to go through immigration at Bangkok itself. We had to be given visa on arrival. But for that we had to go through the procedure at Bangkok and not at the final port of disembarkment. ( we were not prepared for this, and so were very short on time when we landed in Bangkok and found out all this)
2. Please carry Thai currency. We carried our forex card with Thai currency, but the visa office in Thailand wants cash. To get cash from a forex card, you need an ATM machine but the airport does not have an ATM machine on the same floor before the immigration clearance windows. You can only get to an ATM after you get the visa and go down to the main area. In our case, the Thai staff was very kind and helped us through the confusion. But, please, lesson learnt is to carry cash in order to get Visa on Arrival