Earnest money is refundable, it just depends on the circumstances. If you tell the seller that you are backing out of the home buying process before certain deadlines, then there should be no issue refunding the earnest money to you.