Sheikh `Abdul-Majeed Subh, a prominent Azharite scholar, states: “As married couples, if your wife’s period normally lasts 5-7 days you should not have had intercourse with her until her period expires and the blood stops completely, and she performs ghusl. During this period, i.e. 5-7 days, if the blood stops it may come back any time in her normal period. So, a husband should until her normal period comes to end and the blood stops completely.
As for how to expiate for the wrong act if such happens, you should give out charity and resolve to avoid this in the future.