Salama bin Akwa reported,

A funeral was brought to the Prophet ﷺ for him to pray over.He asked, "Does he owe any debt?"They replied, "No."So he prayed over him.Then another funeral was brought to him, and he asked, "Does he owe any debt?"They replied, "Yes."He said, "Pray over your companion yourselves."Abu Qatada said, "His debt is upon me, Messenger of Allah."So he prayed over him.

Azami 5527

Sahih

عن سلمة بن الأكوع

أن النبي ﷺ أتي بجنازة ليصلي عليها، فقال: هل عليه من دين؟ قالوا: لا. فصلى عليه، ثم أتي بجنازة أخرى، فقال: هل عليه من دين؟ قالوا: نعم. قال: صلوا على صاحبكم قال أبو قتادة: علي دينه يا رسول الله، فصلى عليه.

الأعظمي 5527صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Sales
Chapter
Surety, guarantee, and transfer of debt
Section
Legitimacy of surety in loans and debts
Numbering
Jami al-Kamil 5527 (2nd edition)
Azami 5527