Salama bin Akwa reported,

The Prophet ﷺ was brought a funeral bier so he could pray over the deceased. He asked, "Does he owe any debt?"They said, "No."So he prayed over him.Then another bier was brought to him, and he asked, "Does he owe any debt?"They said, "Yes."He said, "Pray over your companion yourselves."Abu Qatada said, "His debt is on me, Messenger of Allah."So he prayed over him.

Bukhari 2295

Sahih

حدثنا أبو عاصم عن يزيد بن أبي عبيد

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

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

البخاري 2295صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Guarantee
Chapter
One who guarantees a debt on behalf of a deceased person has no right to reclaim it
Numbering
Darussalam 2295
Bukhari 2295