Sahih al-Bukhari Book 86, Hadith 49
A person had sexual relation with his wife in the month of Ramadan
(while he was fasting), and he came to Allah's Messenger (ﷺ) seeking his
verdict concerning that action. The Prophet (ﷺ) said (to him), "Can you
afford to manumit a slave?" The man said, "No." The Prophet (ﷺ) said, "Can
you fast for two successive months?" He said, "No." The Prophet (ﷺ) said,
"Then feed sixty poor persons."
A man from the tribe of Aslam came to the Prophet (ﷺ) and confessed that he had committed an illegal sexual intercourse. The Prophet (ﷺ) turned his face away from him till the man bore witness against himself four times. The Prophet (ﷺ) said to him, "Are you mad?" He said "No." He said, "Are you married?" He said, "Yes." Then the Prophet (ﷺ) ordered that he be stoned to death, and he was stoned to death at the Musalla. When the stones troubled him, he fled, but he was caught and was stoned till he died. The Prophet (ﷺ) spoke well of him and offered his funeral prayer.
A man came to the Prophet (ﷺ) in the mosque and said, "I am burnt (ruined)!" The Prophet (ﷺ) asked him, "With what (what have you done)?" He said, "I have had sexual relation with my wife in the month of Ramadan (while fasting)." The Prophet (ﷺ) said to him, "Give in charity." He said, "I have nothing." The man sat down, and in the meantime there came a person driving a donkey carrying food to the Prophet (ﷺ) ..... (The sub-narrator, 'Abdur Rahman added: I do not know what kind of food it was). On that the Prophet (ﷺ) said, "Where is the burnt person?" The man said, "Here I am." The Prophet (ﷺ) said to him, "Take this (food) and give it in charity (to someone)." The man said, "To a poorer person than l? My family has nothing to eat." Then the Prophet (ﷺ) said to him, "Then eat it yourselves."