Yes. the mismatched names may be a problem. Some banks will reject the deposit because of the name issue. You can amend your tax return. But, if it is already in the process you may have to wait until the transfer has been rejected by the bank. When dealing with the IRS on these issues it is difficult to determine the time frame in which the events will occur. It just depends on how fast the bank responds and when the money is returned to the IRS for redistribution. Sometimes, the IRS will just issue a paper check when the refund is rejected.
My comments are NOT LEGAL ADVICE. They are for informational purposes only. Actual legal advice can only be provided after you have signed an engagement letter. Answering this question does not create an attorney client relationship. Remember that without attorney client privilege you could possibly divulge information that can hurt your legal rights in the future. I am a tax attorney in Miami Florida. I can help you with your federal tax issues via a secure client portal if required.
Ms. James gave you a superb response. If the IRS sends the deposit to your cousin's bank, then terrific. If it does not, then follow her advice.
Generally, the IRS does not send funds to accounts not held at least jointly by the taxpayer. If there is an error in the account number, the IRS will normally mail the check to the taxpayer in approximately 4-6 weeks. If you wish, you may attempt to contact the IRS to see if the return has been processed and if something can be done about it.