If the lender finds out that the borrower is financially unable to pay back his loan, then he should be lenient, and should not put any pressure on him to repay it. Doing so may lead to the borrower doing something illegal which may land him in prison. Allah ordained that the lender postpone the debt until a time of ease.
(If it is difficult for someone to repay a debt, postpone it until a time of ease. And if you waive it as an act of charity, it will be better for you, if only you knew.) Al-Baqara 2: 280.
It is desirable for the creditor to write off the debt if the debtor is poor, so he should be kind as Allah was Kind to him, and Muslims should seek to relieve the poor of their debts.
إذا ثبت عند الدائن إعسار المدين، وأنه لا يجد ما يقضي به الدين، وجب عليه انظاره، ويحرم عليه مطالبته بالدين والتسبب في سجنه؛ لأمر الله بانظاره حتى يوسر،
قال الله تعالى:( وإن كان ذو عسرة فنظرة الى ميسرة وان تصدقوا خير لكم إن كنتم تعلمون) البقرة 2:280.
ويستحب للدائن ان يضع منة الدين اذا كان المدين فقيراً، فيحسن كما احسن الله اليه، ويسن للمسلمين أن يسعوا في التخفيف من الديون على الفقراء