Earnest money in a contract to sell

Dear PAO,

I entered into a contract to sell agreement and I already made an initial payment called an “earnest money.” In line with this fact, I want to know if an earnest money is refundable.