Question: Therefore, if the two parties made an agreement from the outset, is that permissible?
Answer: Yes. In that case it is treated as a hire contract: he was entrusted with the item in return for a wage.
***
Fulfilling One’s Promise
My mother asked me for a sum of money to contribute toward building a mosque that is being constructed in our village. At that time I had no surplus beyond my own needs, so I could not comply. I therefore promised her that, God willing, I would give it to her in the future. I then travelled abroad to seek lawful earnings, and during my absence Allah decreed that my mother fell ill and passed away. Does the promise I made to her remain a debt upon me—so that I must pay what I promised to that specific mosque—or may I give it to some other mosque in need? Or does no liability remain, such that I am absolved of the promise?
Answer: Yes, you must—or at the very least it is emphatically incumbent upon you—to fulfill your promise and to pay those dirhams to the very mosque your mother wished the money to be given to, for you promised her that. Honouring and showing kindness to her entails carrying out this promise, hoping that Allah, the Exalted, will accept it and benefit her by it. This is part of being dutiful and good to her. If the mosque your mother designated is now complete and its expenses fully covered, then give the money to another mosque. Nevertheless, as we have said, you should not neglect this promise or withhold those dirhams; rather, you ought—indeed, it is strongly urged upon you—to carry out this promise as an act of filial piety toward your mother.