Sa'id bin al-Musayyib (may Allah have mercy on him) narrates from an Ansari Companion named Basrah (may Allah be pleased with him), who says: I married a virgin woman who was in her seclusion. When I went in to her, she was pregnant. The Prophet (peace and blessings be upon him) said to me: "She is owed the dower for what you made lawful of her private part, and the child will be your slave; and when she gives birth, flog her."
The Shaykh (may Allah have mercy on him) says: Ibn Jurayj took this hadith only from Ibrahim bin Abi Yahya, from Safwan bin Sulaym, and there is disagreement about Ibrahim's integrity.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13889