Salama bin Akwa reported,

We were sitting with the Prophet ﷺ when a funeral bier was brought.The people said, "Pray over him."He asked, "Did he owe any debt?"They said, "No."He asked, "Did he leave anything behind?"They said, "No."So he prayed over him.Then another bier was brought.They said, "Messenger of Allah, pray over him."He asked, "Did he owe any debt?"It was said, "Yes."He asked, "Did he leave anything behind?"They said, "Three dinars."So he prayed over him.Then a third was brought.They said, "Pray over him."He asked, "Did he leave anything behind?"They said, "No."He asked, "Did he owe any debt?"They said, "Three dinars."He said, "Pray over your companion yourselves."Abu Qatada said, "Pray over him, Messenger of Allah, and his debt is upon me."So he prayed over him.

Azami 3745

Sahih

عن سلمة بن الأكوع رضي الله عنه قال

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

الأعظمي 3745صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Prayer over the deceased
Section
Imam should not pray over one who has debt until it is paid off on his behalf
Numbering
Jami al-Kamil 3745 (2nd edition)
Azami 3745