عَنْ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا عَنْ رَسُولِ اللَّهِ صلى الله عليه و سلم فِيمَا يَرْوِيهِ عَنْ رَبِّهِ تَبَارَكَ وَتَعَالَى، قَالَ: إنَّ اللَّهَ كَتَبَ الْحَسَنَاتِ وَالسَّيِّئَاتِ، ثُمَّ بَيَّنَ ذَلِكَ، فَمَنْ هَمَّ بِحَسَنَةٍ فَلَمْ يَعْمَلْهَا كَتَبَهَا اللَّهُ عِنْدَهُ حَسَنَةً كَامِلَةً، وَإِنْ هَمَّ بِهَا فَعَمِلَهَا كَتَبَهَا اللَّهُ عِنْدَهُ عَشْرَ حَسَنَاتٍ إلَى سَبْعِمِائَةِ ضِعْفٍ إلَى أَضْعَافٍ كَثِيرَةٍ، وَإِنْ هَمَّ بِسَيِّئَةٍ فَلَمْ يَعْمَلْهَا كَتَبَهَا اللَّهُ عِنْدَهُ حَسَنَةً كَامِلَةً، وَإِنْ هَمَّ بِهَا فَعَمِلَهَا كَتَبَهَا اللَّهُ سَيِّئَةً وَاحِدَةً
Meaning: The Messenger of Allah ﷺ reported from his Lord: Allah has written the good deeds and the bad deeds, and then made this clear. Whoever intends a good deed and does not do it, Allah writes it with Him as one complete good deed. If he intends it and does it, Allah writes it with Him as ten good deeds, up to seven hundred times, and up to many more. If he intends a bad deed and does not do it, Allah writes it with Him as one complete good deed. If he intends it and does it, Allah writes it as one bad deed.
Sahih: agreed upon by al-Bukhari and Muslim. A hadith qudsi.
Narrated by Abdullah ibn Abbas · Sahih al-Bukhari 6491; Sahih Muslim 131