The "Store Credit" can be created  when doing a return or exchange. 

A valid customer is required on the receipt when generating a "Store Credit" as a refund. It will not be possible to create "Store Credit" by refund for the "walk in’ customer".

After clicking on "Refund" button a pop up window will appear, click on "Store Credit".

A new window will appear from where you can enter the sum you want to put on "Store Credit", after click "Done". .