person who discharges on behalf of another a debt that is due may recover it if he intends to recover it, even without the other’s permission—unless it is a debt for which the debtor’s intention is a condition. In that case, he may recover it only with permission, as with zakah and expiation, because the one upon whom the zakah is due neither formed the intention nor appointed an agent.
For example, a man comes and says, “I am going to the fighters in Allah’s cause; give me some zakah money.” Knowing that my companion has abundant zakah to give, I give this man thirty thousand dirhams as my companion’s zakah. May I recover it? No, because zakah requires an intention, whereas the one liable for the zakah did not form such an intention. Yet the thirty thousand does not go to waste; rather, it is with Allah, and its giver will be rewarded for it, and it will count as voluntary charity for the one who gave it.
But if I inform him and say, “I paid zakah on your behalf,” and he replies, “May Allah reward you well; I approve of this action,” then, according to the established school of law, it does not suffice, because the intention was absent at the time of payment. The correct view, however, is that it is valid. The evidence for this is the hadith of Abu Hurayrah (may Allah be pleased with him) concerning his guarding of the dates. He was the Messenger’s agent for the charity of the Fast-Breaking, guarding it, when one night Satan came and took some of the dates. Abu Hurayrah seized him, but Satan said that he was poor and had a family, so Abu Hurayrah felt compassion for him and let him go. The same happened on the second night. On the third night, Abu Hurayrah said, “You must go to the Messenger of Allah (peace and blessings be upon him).” Satan feared the Messenger of Allah (peace and blessings be upon him) and said, “I will tell you of a verse which, if you recite it at night, Allah will continue to appoint a guardian over you, and no devil will come near you until morning.” He told him of the Verse of the Throne. When morning came, the Messenger of Allah (peace and blessings be upon him) asked him, “What did your prisoner do last night?” He said, “He spoke the truth to you, though he is...”