Reference: Fataawa Ramadhaan – Volume 1, Pages 362-363, Fatwa No.318
al-Muntaqaa min Fataawa Shaykh Saalih Ibn Fowzaan – Volume 3, Page 132
Question: A woman who gave birth finds her postpartum bleeding has ceased within a week [of giving birth] and then purifies herself, thereafter she fasts alongside the rest of the Muslims in Ramadhaan for a number of days, but then her bleeding starts up again – should she then refrain from fasting in this condition? And is she required to make up the [fasts for the] days which she did fast in addition to the days which she refrained from fasting?
Response: From that in which there is no doubt is that the postpartum bleeding woman should not fast so long as she experiences blood flow within the [first] forty days [after giving birth]. And if the blood flow ceases before forty [days], she should take the ritual bath of purification and then fast, and if the blood flow returns before the completion of the forty [days], then she should refrain from fasting for the duration of the blood flow up until forty days.
As for the days she fasted when the blood flow ceased, then her fast is valid, because she fasted them in a state of purity.
And this is the most correct of the two opinions of the scholars in this matter, and Allaah has the Complete Knowledge of All affairs.