It is narrated from Abu Sa'id Khudri (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: I used to forbid you from visiting graves, but now you may visit them, and do not say anything wrong.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 605
Hadith Takhrijاخرجه مسلم، الجنائز، باب استئذان النبي صلی اللہ علیہ وسلم ربه في زيارة قبر امه (977) والنسائی، الجنائز، باب زيارة القبور (2035) عن بريدة۔
It is narrated from Abu Huraira (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: The soul of the believer remains suspended because of his debt until it is paid off on his behalf.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 606
Hadith Takhrijاخرجه الترمذی، الجنائز، باب ماجاء ان نفس المؤمن معلقة بدينه حتى يقضى عنه (1079). وقال: ”حسن“ وابن ماجة، الصدقات، باب التشديد في الدين (2413)۔