Language:
كتاب الصوم
30  
Fasting
(30)
Chapter: Sexual intercourse with wife in Ramadan and the expiation of that.
(30)
باب إِذَا جَامَعَ فِي رَمَضَانَ وَلَمْ يَكُنْ لَهُ شَىْءٌ فَتُصُدِّقَ عَلَيْهِ فَلْيُكَفِّرْ
Sahih al-Bukhari 1936

Narrated Abu Huraira:

While we were sitting with the Prophet (ﷺ) a man came and said, "O Allah's Messenger (ﷺ)! I have been ruined." Allah's Messenger (ﷺ) asked what was the matter with him. He replied "I had sexual intercourse with my wife while I was fasting." Allah's Messenger (ﷺ) asked him, "Can you afford to manumit a slave?" He replied in the negative. Allah's Messenger (ﷺ) asked him, "Can you fast for two successive months?" He replied in the negative. The Prophet (ﷺ) asked him, "Can you afford to feed sixty poor persons?" He replied in the negative. The Prophet (ﷺ) kept silent and while we were in that state, a big basket full of dates was brought to the Prophet (ﷺ) . He asked, "Where is the questioner?" He replied, "I (am here)." The Prophet (ﷺ) said (to him), "Take this (basket of dates) and give it in charity." The man said, "Should I give it to a person poorer than I? By Allah; there is no family between its (i.e. Medina's) two mountains who are poorer than I." The Prophet (ﷺ) smiled till his premolar teeth became visible and then said, 'Feed your family with it."

حَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، عَنِ الزُّهْرِيِّ، قَالَ أَخْبَرَنِي حُمَيْدُ بْنُ عَبْدِ الرَّحْمَنِ، أَنَّ أَبَا هُرَيْرَةَ ـ رضى الله عنه ـ قَالَ بَيْنَمَا نَحْنُ جُلُوسٌ عِنْدَ النَّبِيِّ صلى الله عليه وسلم إِذْ جَاءَهُ رَجُلٌ، فَقَالَ يَا رَسُولَ اللَّهِ هَلَكْتُ‏.‏ قَالَ ‏"‏ مَا لَكَ ‏"‏‏.‏ قَالَ وَقَعْتُ عَلَى امْرَأَتِي وَأَنَا صَائِمٌ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ هَلْ تَجِدُ رَقَبَةً تُعْتِقُهَا ‏"‏‏.‏ قَالَ لاَ‏.‏ قَالَ ‏"‏ فَهَلْ تَسْتَطِيعُ أَنْ تَصُومَ شَهْرَيْنِ مُتَتَابِعَيْنِ ‏"‏‏.‏ قَالَ لاَ‏.‏ فَقَالَ ‏"‏ فَهَلْ تَجِدُ إِطْعَامَ سِتِّينَ مِسْكِينًا ‏"‏‏.‏ قَالَ لاَ‏.‏ قَالَ فَمَكَثَ النَّبِيُّ صلى الله عليه وسلم، فَبَيْنَا نَحْنُ عَلَى ذَلِكَ أُتِيَ النَّبِيُّ صلى الله عليه وسلم بِعَرَقٍ فِيهَا تَمْرٌ ـ وَالْعَرَقُ الْمِكْتَلُ ـ قَالَ ‏"‏ أَيْنَ السَّائِلُ ‏"‏‏.‏ فَقَالَ أَنَا‏.‏ قَالَ ‏"‏ خُذْهَا فَتَصَدَّقْ بِهِ ‏"‏‏.‏ فَقَالَ الرَّجُلُ أَعَلَى أَفْقَرَ مِنِّي يَا رَسُولَ اللَّهِ فَوَاللَّهِ مَا بَيْنَ لاَبَتَيْهَا ـ يُرِيدُ الْحَرَّتَيْنِ ـ أَهْلُ بَيْتٍ أَفْقَرُ مِنْ أَهْلِ بَيْتِي، فَضَحِكَ النَّبِيُّ صلى الله عليه وسلم حَتَّى بَدَتْ أَنْيَابُهُ ثُمَّ قَالَ ‏"‏ أَطْعِمْهُ أَهْلَكَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1936
In-book reference : Book 30, Hadith 43
USC-MSA web (English) reference : Vol. 3, Book 31, Hadith 157
  (deprecated numbering scheme)