If you made a genuine effort to identify a deserving recipient and only later discovered he was not eligible, the majority (Ḥanafīs, Ḥanbalīs and a report from Mālik) hold your zakat is valid and need not be repeated, citing the ḥadīth of the man whose charity fell into the hands of a thief, an adulteress and a rich man and was nonetheless accepted from him, since a servant is only accountable for what he intended ("Actions are but by intentions"). The Shāfiʿīs hold it must be paid again, because Allah named eight specific categories in Sūrat al-Tawbah and the obligation is not discharged outside them. If, however, you handed it over carelessly without any checking, or you knowingly gave it to someone outside the eight categories, then you must pay it again. Going forward, ask discreetly or give through a trustworthy person or fund.
Q&A · Zakat
I gave my zakat to someone who turned out not to be eligible — do I have to pay it again?
Evidence — the daleel
Quran 9:60Sahih al-Bukhari 1 ṢaḥīḥSahih Muslim 1907 ṢaḥīḥSahih al-Bukhari 1421 ṢaḥīḥSahih Muslim 1022 Ṣaḥīḥ
On deen2u
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.