Some time ago, a friend of mine was in need of a large sum of money, and he asked me to lend some to him. I collected an amount of money, part of which was from me and the rest from other people. I gave him the money and told him that it was not a debt, yet he insisted it was. To avoid embarrassing him, I told him that he can repay the money after all his financial problems end. Now, after years, he came and told me that he would soon be able to pay off the debt. However, I forgot the persons who contributed to this sum of money and the exact amount each one paid, noting that they and I paid that money as a donation. What should I do if he repays the money?
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
Possessing the given thing is a prerequisite for the validity of the gift. Ibn Abi Zayd Al-Qayrawaani, a Maaliki scholar, said: "No gift, charity, or endowment is valid without possession. If a person given a gift does not accept it, he clearly does not possess it." Accordingly, the money you collected for your friend still belongs to those who paid it. Should you receive it, hand it over to them by any means possible. However, if you cannot do this, because you forgot them, as you mentioned, or do not know their whereabouts, you may in this case give the money as charity on their behalf. If it happens later that they, or some of them, come to you, they shall have one of two choices: either to accept that you gave their money as charity and expect the reward; or to take their money back and yours is the reward of charity. With regard to the amounts paid by each one of them, try your best to identify them.
That said, you should not have done what you did with the money paid by other people. You should have told them that the man did not accept the money as a gift and discussed with them the option to give it to him as a debt; had they accepted, the debt would have been written down for documentation.
You can search for fatwa through many choices