If it's a scheduled stopover the system will automatically collect this tax, if it thinks it is a transit it doesnt and you cant leave the transit area unless you are willing to pay.
And for your info - every ticket* you have purchased in the MANY MANY years since the 500 baht was collected at the airport has had the 700 baht included as part of the taxes and surcharges of the ticket. (* - referring to tickets that have had a stopover in Thailand or been ex-Thailand). The tax code is TS.
So I suggest you take a chill pill.