All of the rules of how it'll work should be written out clearly ahead of time. There should be a written "escrow agreement" that you, the buyer, and the escrow agent all sign. The agreement can say what the three of you agree to for how and when the deal gets finalized and the money sent to you, or canceled and the money gets sent back to the buyer. Also any escrow agent fee should be specified. You're free to negotiate for different rules if the rules that the buyer or escrow agent propose to you make you uncomfortable.