1. If you want to purchase the flat then do so in phased manner.
2. So when you make the first payment as earnest money then you do so only on execution of a sale agreement.
3. Consult an advocate to draft such agreement and check clear title of the property.