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 has intercourse with his wife while she is menstruating that he "shall give one dinar or half a dinar in charity."
The hadith of Ya'qub bin Ata is not used as evidence.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحيض / 1527