Some do that. But my Thai friend says it’s illegal for them to demand paying right away. I got caught speeding a couple of months ago near Chiangmai. At checkpoint the cop waved me aside, showed me photo of speed camera taken a few moments earlier, wrote the ticket, asked for payment. I politely said it’s ok I’ll pay later. He handed me the ticket, went on my way.
If you encounter a situation where police demand payment on the spot or take your vehicle keys etc tell them about the illegality pull out your smartphone and pretend or actually record the exchange. The cop will Sh!t himself and will let you go.