Sayyiduna Abu Qatadah (may Allah be pleased with him) said: A man came to the Prophet (peace and blessings be upon him) and asked: O Messenger of Allah, if I am killed in the path of Allah, will Allah Almighty forgive my sins? He (peace and blessings be upon him) said: "If you are killed in the path of Allah while being patient, hoping for reward, advancing and not turning your back, Allah Almighty will wipe out your sins." When he (peace and blessings be upon him) had sat down, he called him and said: "What did you say?" He repeated his words, and he said: "Except debt." And the Prophet (peace and blessings be upon him) said: "Jibril (peace be upon him) informed me so."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17825
(a) Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) narrates from the Prophet (peace and blessings be upon him) that he (peace and blessings be upon him) said: "Being martyred in the path of Allah wipes out all sins, except that debt remains." (b) Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates from the Prophet (peace and blessings be upon him): "The soul of the believer remains suspended because of his debt until it is paid off on his behalf."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17826