The short answer is it depends.If the buyer cancels the home purchase under the conditions stated in the contract, they can receive their money back. This refund may not include any fees, or charges for appraisals and inspections. The contract may include conditions such as an acceptable time period for canceling the deal.
However, if for any reason, the buyer is not eligible to receive a refund, then the funds will be transferred to the seller.