A man from the Ansar was brought before the Messenger of Allah ﷺ for him to perform the funeral prayer. The Prophet ﷺ said, "Pray over your companion yourselves, for he has a debt upon him."Abu Qatada said, "I will pay it."The Prophet ﷺ asked, "In full?"He replied, "In full."So he prayed over him.
أخبرنا محمود بن غيلان قال حدثنا أبو داود قال حدثنا شعبة عن عثمان بن عبد الله بن موهب سمعت
أن رسول الله ﷺ أتي برجل من الأنصار ليصلي عليه فقال النبي ﷺ صلوا على صاحبكم فإن عليه دينا قال أبو قتادة هو علي قال النبي ﷺ بالوفاء قال بالوفاء فصلى عليه
[Its chain of transmission is sahih]Tirmidhi narrated it in the Book of Funerals, Chapter on What Has Been Said Regarding Praying Over One Who Owes a Debt, hadith no. 1069, from Mahmud bin Ghaylan with this wording, and he said, "Hasan sahih." It is also found in Al-Kubra, hadith no. 2087, and Ibn Hibban graded it sahih in Al-Mawarid, hadith no. 1161.