Re: Refund for deposited check
Assuming you have created an item called Advance / Upfront Deposit for the Sales Receipt ( since cash is received in advance use the Sales Receipt )
Issue a Cheque > Items tab > ITEM select Advance / Upfront Deposit and the relevant Customer, enter other details hit Save.
Note: Advance / Upfront Deposit item need to be linked with a liability type chart of account.
Comment back for further clarifications, even if you follow a different method to enter the upfront payment.