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: "Whoever of you comes to his wife while she is menstruating should give one dinar in charity; and if he has intercourse with her when she has become pure but has not yet taken the ritual bath, he should give half a dinar in charity."
Thus it is in the narration of Ibn Jurayj, while Ibn Abi Arubah narrated it from Abd al-Karim and made the explanation the words of Miqsam.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحيض / 1521