Rent with option to buy
Renting with an option to buy is like a normal rental agreement with an additional option to buy after a set period of time or a set amount of money paid. This also applies for the owner, who, if willing to sell, has to offer it first to the renter, who can decide to buy or not afterwards.
Usually the renter has to pay a non-refundable fee for the option, which is also a collateral for you preventing the owner from selling the apartment.
