Earnest money goes toward your down payment and closing costs, so check that it’s credited properly at closing. If the transaction fails, you can get the earnest money back as long as the reason relates to a contingency in the purchase contract. Examples of common contingencies include a home inspection that turns up serious problems, an appraisal coming in lower than the sale price or being unable to sell a current home before closing on the new one.