I think you can use 1031 for the actual purchase price when received; however, the down payment and credits during the rental period won’t qualify for deferral if you recieve or control the money. If you use a 1031 Starker trust for that money, the time frame for identifying and closing on the replacement property (45 days and 180 days respectively) is going to present a problem. There might be other problems, so consult with a 1031 specialist when you get ready to do it.
Could you do a 1031 Exchange with a Lease-Option? The property isn’t sold until the option is exercised so that shouldn’t be a problem, but how would you handle the deposit converted to down payment?
I assume you own the real property and have leased it with an option to sell the property. In this case you can do a 1031 exchange on the real property once the option has been exercised and the property will be sold, but the option money paid prior to the sale will be taxable. If you own the lease with an option to buy the real property and the lease has a period of 30 years or more, the leasehold interest could be sold thru a 1031 tax deferred exchange.
I would be happy to send you more detailed information regarding 1031 exchanges. Please email your mailing address if you are interested.