If your direct deposit is not updated to your new account before the old account closes, you should immediately contact your paying agency (Social Security Administration, Veteran’s Affairs, et cetera) to provide updated instructions to receive that payment, even if you have already updated your account information with them for future payments.
In the case of the Social Security Administration, you may contact 1-800-772-1213, or go to a local Social Security Administration branch office to provide updated bank account information for the payment that could not be credited. The SSA shares as general information that those funds can be paid to you promptly, after they’ve been returned to them, on a one-off basis.
Other paying agencies may have different requirements. For more information regarding switching electronic payments, or to get contact information for other paying agencies, visit Treasury’s Go Direct website or call the helpline at 1-800-333-1795.