It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said concerning the one who comes to his wife while she is menstruating: "He shall give one dinar in charity, and if he does not find (a dinar), then half a dinar." Miqsam (may Allah have mercy on him) gave its explanation: if he had intercourse while the blood was coming, then one dinar; if while the blood was ending, then half a dinar; and if the woman had not taken the ritual bath, then half a dinar.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحيض / 1523