If this orphan has wealth, such as inheritance or charity that is given to him, then his zakaat al-fitr should be paid from his wealth. Al-Nawawi (may Allah have mercy on him) said: â€¦ As for the orphan who has wealth, his zakaat al-fitr should be paid from his wealth, in our opinion. This is the view of the majority, including Maalik, al-Awzaai, Abu Haneefah, Abu Yoosuf and Ibn al-Mundhir.
End quote from al-Majmoo, 6/109
But if he does not have any wealth, rather it is you who are spending on him and providing what he needs, then you do not have to pay zakaat al-fitr on his behalf, because zakaat al-fitr is only obligatory upon the one who is obliged to spend on him. As for the one who is not obliged to spend on him but is doing so voluntarily, he is not obliged to pay zakaat al-fitr on his behalf.
Al-Nawawi (may Allah have mercy on him) said:
If a person voluntarily spends on the maintenance of someone who is not related to him, he is not obliged to pay his zakaat al-fitr, and there is no difference of opinion concerning that among us. This is the view of Maalik, Abu Haneefah and Dawood. Ahmad said: He does have to pay it. â€¦
End quote from al-Majmoo, 6/100
Ibn Qudaamah said: This is the view of the majority of our companions, because the Prophet (blessings and peace of Allah be upon him) said: Pay zakaat al-fitr on behalf of those whom you maintain.
Abu'l-Khattaab favoured the view that he does not have to pay his zakaat al-fitr, because he is not obliged to maintain him. This is the view of the majority of scholars and it is the correct view, in sha Allah.
End quote from al-Mughni, 2/362
The hadeeth, Pay zakaat al-fitr on behalf of those whom you maintain, was classed as da eef (weak) by many scholars. Al-Nawawi said: Its isnaad is daeef. Al-Bayhaqi said: Its isnaad is not strong. Al-Bayhaqi also narrated it from Jafar ibn Muhammad, from his father, from the Prophet (blessings and peace of Allah be upon him), but this is also mursal. To sum up, this phrase, those whom you maintain is not proven.
End quote from al-Majmoo, 6/68. See also the answer to question no. 99585.
Even if we assume that it is saheeh, the spending referred to in the hadeeth is that which is obligatory, not that which is voluntary.
And Allah knows best.
Reproduced from Islam QA