We strongly recommend you hire an independent lawyer before buying a property in Portugal. A lot of tasks done by a notary in Belgium or the Netherlands, are done by your lawyer in Portugal. A real estate agent is allowed to deal with legal issues, but to be sure your best interests are being looked after a lawyer is recommended. It can be financially advantageous to use the seller's lawyer. Note: this is not recommended due to possible conflicts of interest.
A lawyer can take care of several legal matters for you, such as debts on the property, the selling party's property rights, application for the fiscal number, research into legality and utilities, requesting a zoning plan etc.
Your lawyer can apply for your fiscal number (numero de contribuinte) for you. You'll need this number to purchase a property in Portugal. If you do not yet live in Portugal, you'll need someone to have the fiscal responsibility for you. This can be someone you know (a friend) in Portugal or this can be your lawyer. If you choose for your lawyer to have this respondibility for you, be sure that the service is not overpriced. Possibly compare this cost to other lawyer's cost.
A lawyer can also draw up a provisional purchase contract. In this contract agreements between seller and buyer are captured. This contract is binding en protects the buyer as well as the seller.
Very often, the down payment is 20% of the total amount. It is advised to make this payment directly to the owner or through a client bankaccount of your lawyer. It is not recommended to transfer the amount to the selling real estate agent.