It is your check. Of course, you can stop the payment before your bank actually pay it out. It was a bit stupid to just listen to what you agent said without actually reading and understanding the agreement of sale. The contract might say "where the buyer cancel the contract, the deposit will forfeit" or the similar clause. I would suggest that you read the contract and consult a real estate attorney if necessary.