Question on a Performance Mortgage

I want to offer a seller 90% of the FMV of a property, and sell it to a buyer for 100% FMV. If the buyer qualifies for financing and has the down payment money, I execute the contract with the seller, which I then assign to the buyer. My profit is to come in the 10% spread. To get this, I need to have the seller agree to a mortgage for this amount based on my bringing a qualified buyer.

How does one write this up? What type of mortgage is this? Is it a performance mortgage? Is there anything else I need to do to make this work and be legit?