Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Allah says, 'When My servant intends to commit a bad deed, do not record it against him until he actually does it. If he does it, record it as one bad deed. If he abandons it for My sake, record it for him as a good deed. If he intends to do a good deed but does not do it, record it for him as one good deed. If he does it, record it for him as ten good deeds, up to seven hundred.'"

Azami 15080

Sahih

عن أبي هريرة

أن رسول الله ﷺ قال: يقول الله: إذا أراد عبدي أن يعمل سيئة فلا تكتبوها عليه حتى يعملها، فإن عملها فاكتبوها بمثلها، وإن تركها من أجلي فاكتبوها له حسنة، وإن أراد أن يعمل حسنة فلم يعملها، فاكتبوها له حسنة، فإن عملها فاكتبوها له بعشر أمثالها إلى سبعمائة.

الأعظمي 15080صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Asceticism and softening of the heart
Chapter
Virtue of asceticism and softening of hearts
Section
If a servant intends a good deed it is recorded, and if he intends a bad deed it is not recorded
Numbering
Jami al-Kamil 15080 (2nd edition)
Azami 15080