The Prophet ﷺ said, "When the believing servant is about to depart from this world and proceed to the next, Allah sends down to him angels from the sky..."Then he continued the hadith in full, as it was reported establishing the punishment of the grave, saying, "His soul is taken out, and they ascend with it until they reach the sky. Permission to enter is sought, and it is opened for him, until he is brought to the seventh sky. Then Allah says, 'Record the document of My servant in Illiyyun in the seventh sky, and return him to the earth, for from it I created them, to it I return them, and from it I will bring them out once more.'As for the disbeliever, his soul is brought to the lowest sky, permission to enter is sought, but it is not opened for him."Then he recited, "The gates of the sky will not be opened for them" [Araf 7:40], and he mentioned the rest of the hadith.
عن النبي ﷺ قال: إن العبد المؤمن إذا كان في انقطاع من الدنيا، وإقبال من الآخرة، أنزل الله إليه ملائكة من السماء…- فساق الحديث كما ساقه بكماله في إثبات عذاب القبر- فيخرج روحه، فيصعدون به حتى ينتهوا به إلى السماء، فيستفتح، فيفتح له، حتى ينتهي به إلى السماء السابعة، فيقول الله عز وجل: اكتبوا كتاب عبدي في عليين في السماء السابعة، وأعيدوه إلى الأرض، فإني منها خلقتهم وفيها أعيدهم ومنها أخرجهم تارة أخرى، وأما الكافر قال: فينتهي به إلى السماء الدنيا، فيستفتحون فلا يفتح له، ثم قرأ {لا تفتح لهم أبواب السماء} [سورة الأعراف: ٤٠]، فذكر الحديث.
Abu Dawud (4753) narrated it from Hannad bin Sari, and it is also in his Zuhd (339), and Imam Ahmad (18534) narrated it as well, both of them, meaning Hannad and Imam Ahmad, from Abu Muawiya, from Amash, from Minhal bin Amr, from Zazan, from Bara. See its complete referencing in Ithbat Azab Qabr.As for Allah's statement, "the gates of heaven will not be opened for them", this is a clear indication that Allah is above the heaven, because the gates of heaven are only opened for the souls of believers so that their deeds may be raised up to Allah
.