The Prophet ﷺ said, "Whoever testifies that there is no god but Allah alone with no partner, and that Muhammad is His servant and Messenger, and that Isa is the servant of Allah and His Messenger, His word which He bestowed upon Maryam and a spirit from Him, and that Paradise is real and the Fire is real, Allah will admit him into Paradise, whatever his deeds may have been."
عن النبي ﷺ قال: من شهد أن لا إله إلا الله وحده لا شريك له، وأن محمدا عبده ورسوله، وأن عيسى عبد الله ورسوله، وكلمته ألقاها إلى مريم وروح ألقاها إلى مريم وروح منه، والجنة حق والنار حق، أدخله الله الجنة على ما كان من العمل.
Bukhari narrated it in the Hadiths of the Prophets (3435), from Sadaqa bin Fadl, "Walid narrated to us, from Uzai, who said, 'Umayr bin Hani narrated to me, who said, Junada bin Abu Umaya narrated to me, from Ubada,'" and he related the hadith.Muslim narrated it in the Book of Faith (28) through another route, from Walid bin Muslim, from Ibn Jabir, who said, "Umayr bin Hani narrated to me with his chain," and he added, "and Allah will admit him through whichever of the eight gates of Paradise he wishes."Bukhari alluded to this narration, in which Walid said, "Ibn Jabir narrated to me," and in the rest of the chain the indirect "an" formula was used.Muslim also narrated it through another route, from Sanabihi, from Ubada bin Samit, that he said, "I came in to see him while he was dying, and I wept, so he said, 'Wait, do not weep. By Allah, if I am called upon to bear witness, I will testify on your behalf, and if I am asked to intercede, I will intercede for you, and if I am able, I will benefit you.'" Then he said, "By Allah, there is no hadith I heard from the Messenger of Allah ﷺ containing good for you that I did not tell you, except for one hadith, which I will tell you today, now that I have been encompassed by death. I heard the Messenger of Allah ﷺ say, 'Whoever testifies that there is no god but Allah, and that Muhammad is the Messenger of Allah, the Fire is forbidden to him.'"