Language:
كتاب الإيمان
2  
Belief
(28)
Chapter: To observe fasting (according to Islamic teachings)] during the month of Ramadan (sincerely and faithfully) hoping for Allah's Reward only, is a part of faith
(28)
باب صَوْمُ رَمَضَانَ احْتِسَابًا مِنَ الإِيمَانِ
Sahih al-Bukhari 38

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "Whoever observes fasts during the month of Ramadan out of sincere faith, and hoping to attain Allah's rewards, then all his past sins will be forgiven."

حَدَّثَنَا ابْنُ سَلاَمٍ، قَالَ أَخْبَرَنَا مُحَمَّدُ بْنُ فُضَيْلٍ، قَالَ حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 38
In-book reference : Book 2, Hadith 31
USC-MSA web (English) reference : Vol. 1, Book 2, Hadith 38
  (deprecated numbering scheme)