The Prophet ﷺ said, "Whoever says in the morning or in the evening, 'Allah, You are my Lord, there is no god but You. You created me and I am Your servant. I hold to Your covenant and Your promise as best I can. I seek refuge in You from the evil of what I have done. I acknowledge Your favor upon me, and I confess my sin, so forgive me, for none forgives sins except You,' and then dies that day or that night, will enter Paradise."
حدثنا أحمد بن يونس حدثنا زهير حدثنا الوليد بن ثعلبة الطائي
عن النبي ﷺ قال من قال حين يصبح أو حين يمسي اللهم أنت ربي لا إله إلا أنت خلقتني وأنا عبدك وأنا على عهدك ووعدك ما استطعت أعوذ بك من شر ما صنعت أبوء بنعمتك وأبوء بذنبي فاغفر لي إنه لا يغفر الذنوب إلا أنت فمات من يومه أو من ليلته دخل الجنة
[Its isnad is sahih] Ibn Majah narrated it in the chapter on supplications, in the section on what a man says when he wakes up and when he retires in the evening, hadith no. 3872, from the hadith of Walid bin Thalaba, with this wording. Ibn Hibban graded it sahih, hadith no. 2353, as did Hakim, 1/514, 515, and Dhahabi agreed with him.