Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says: Whoever gives a loan should stipulate nothing except its repayment, and should not set any other condition.
Some weak narrators traced it back to the Prophet from Nafi', and that is worthless.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 10936