Abd al-Hamid (may Allah have mercy on him) said: I went to Sayyiduna Anas bin Malik (may Allah be pleased with him), and he was saying: All praise is for the One who holds back the sky from falling upon the earth, except by His permission. A man said: O Abu Hamzah, if you would narrate a hadith to us, perhaps Allah will benefit us by it. Sayyiduna Anas (may Allah be pleased with him) said: Whoever of you is able to die in a state where he has no debt, let him certainly do so. For I was with the Messenger of Allah (peace and blessings be upon him) when a funeral was brought so that he (peace and blessings be upon him) would lead the funeral prayer over him. He (peace and blessings be upon him) asked: "He is not in debt, is he?" They said: Yes. He (peace and blessings be upon him) said: "My leading the prayer will not benefit a man whose soul is held in pledge in his grave; his soul is not raised up to Allah. If a man stands guarantor for his debt, then I will lead the funeral prayer; my funeral prayer will benefit him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضمان / 11407