Question: If a man orders another man, or appoints him as his agent, to sell a commodity for twenty, for example, and he sells it for twenty-five, is it permissible for the man (agent) to take the extra five for himself and give the owner of the commodity twenty?
The answer – and Allah is the One who grants success – is that the five mentioned belong to the owner of the commodity, because it is part of the price of his commodity. It is not permissible for the man (agent) to take it, and the owner of the commodity is not obliged to give it in charity.
Those who say that he should give the five in charity may use as evidence the ḥadīth of Ḥakīm ibn Ḥizām, that the Prophet (May Allah bless him and his family and grant them peace) gave him a dīnār and ordered him to buy for him with it an animal for sacrifice. Ḥakīm went and bought a sheep for a dīnār, then sold it for two dīnārs, then bought a sheep for a dīnār, and returned to the Prophet (May Allah bless him and his family and grant them peace) with a sheep and a dīnār. The Prophet (May Allah bless him and his family and grant them peace) took the sheep and ordered him to give the dīnār in charity, and he supplicated for Ḥakīm that he be blessed in his buying and selling. This is the gist of the narration.
It may be said in reply: What is closer (to the truth) is that the Prophet (May Allah bless him and his family and grant them peace) ordered him to give the dīnār in charity because the Prophet (May Allah bless him and his family and grant them peace) had ordered him to buy a sacrificial animal with the dīnār. Ḥakīm bought a sacrificial animal, and by his buying it, it became a sacrificial animal, and thus it became a sacrifice offered to Allah. So the Prophet (May Allah bless him and his family and grant them peace) ordered him to give the dīnār in charity because it was from the price of a sacrificial animal that had been designated as a sacrifice by purchasing it for that purpose.
The ḥadīth of Ḥakīm ibn Ḥizām contains several benefits, among them:
1. That the approval of the owner validates the sale conducted by an unauthorized person (al-faḍūlī).
2. That the owner’s ordering the unauthorized person to dispose of the price, or to receive it, or his supplication for him for blessing, constitutes an approval of the sale.
3. That the sacrificial animal becomes a sacrificial animal by purchasing it with the intention that it be a sacrifice.
4. That certain types of disposal in another’s property are permissible when his approval is presumed.
5. That it is valid to appoint an agent to carry out certain financial acts of devotion, such as purchasing and giving charity.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2