Refund direct deposit reroute

My bank closed my account before I was able to receive my direct deposit refund. Is there anyway for me to reroute into a different bank it has been processed. Yes it has been accepted, but I haven’t received the payment yet.