A man was brought to the Prophet ﷺ for the funeral prayer to be performed over him. The Prophet ﷺ said, "Pray over your companion yourselves, for he has a debt upon him."Abu Qatada said, "It is upon me."The Messenger of Allah ﷺ asked, "Will you pay it in full?"He replied, "I will pay it in full."So he prayed over him.
حدثنا محمود بن غيلان حدثنا أبو داود أخبرنا شعبة عن عثمان بن عبد الله بن موهب قال سمعت عبد الله بن
أن النبي ﷺ أتي برجل ليصلي عليه فقال النبي ﷺ صلوا على صاحبكم فإن عليه دينا قال أبو قتادة هو علي فقال رسول الله ﷺ بالوفاء قال بالوفاء فصلى عليه
[Its isnad is sahih] Nasai also reported it: 4/65, no. 1962 (Funerals, chapter on the funeral prayer for one who has debt) from Muhammad bin Ghaylan through the same chain, and Ibn Hibban graded it sahih, no. 1157.On this topic there are also narrations from Jabir [Abu Dawud, no. 3343], Salama bin Akwa [Bukhari, no. 2289], and Asma bint Yazid [Tabarani in Al-Kabir, 24/184, 185, no. 466].