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 is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
If this extra money was not a condition when conducting the loan contract, and it is not generally a habit to give extra money for a loan, then there is no harm for you to benefit from this extra money, Inshaa' Allaah. Imaam Al-Bukhari reported that a man came to the Prophet
and said: "I want to take back my camel which I had lent you." So the Prophet
said to the companions
: "Give him back a camel". They replied: "We can't find a camel similar to the one he had lent us; we can only find a camel of a better age than his." The man said: "You have indeed given me my due in full, may Allaah suffice you." Thereupon the Prophet
said: "Give the camel to him, the best among the people are those who are better in settlement."
What is forbidden is to put a condition of extra money to the loan contract which is meant to be an act of kindness to the person who seeks it. So it is not permissible to use the loan as a means to get a benefit by conditioning extra money to it; otherwise this will be Ribaa (interest and usury); from this comes the rule 'any loan that brings a benefit is usury.'
Allaah knows best.