Sunan Ibn Majah Book 15, Hadith 19
the Mother of the Believers Maimunah used to take out loans frequently, and some of her family said: “Do not that,” and they denounced her for that. She said: “No. I heard my Prophet (ﷺ) and my close friend say: ‘There is no Muslim who takes out a loan and Allah(SWT) knows that he intends to pay it back, but Allah(SWT) will pay it back for him in this world.'”
“I heard 'Abdullah bin Abu Qatadah narrate from his father that a corpse was brought to the Prophet (ﷺ) for him to offer the funeral prayer, and he said: 'Pray for your companion, for he owes a debt.' Abu Qatadah said: 'I will stand surely for him?' The Prophet (ﷺ) said: 'In full?' He said: 'In full.” And the debt he owed was eighteen or nineteen Dirham.”
“Allah will be the borrower until he pays off his debt, so long as it (the loan) is not for something that Allah dislikes.”