I did something similar when coming to Chiang Rai, not Chiang Mai. Chiang Rai were pretty picky.....i entered nong kai from laos on a tuesday. Took a night bus the tuesday night and arrived the wednesday morning. I went to immigration to submit my 24 hour residency on the wedneday afternoon and i would have had to pay the fine (my landlord was away) if i didnt show my bus ticket receipt....