All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The maximum period of menstruation – according to the majority of scholars – is 15 days and nights. They differed about the days which are over the woman's normal period which does not exceed 15 days or happen frequently. Some scholars, such as Shaafi‘i and some Hanbali scholars, deemed this period as menstruation. Therefore, you were required to wait until the 15 days elapse. If they elapsed with continuation of blood discharge, you would obviously be having vaginal bleeding outside menses. Since the blood stopped after 12 days, this period would entirely be considered menses. That is because the length of the menstrual period may change, but not necessarily recur with that change, contrary to the opinion of Hanbali scholars.
Therefore, your Ihraam for the second ‘Umrah is valid and you do not incur any sin regarding making Tawaaf during the menses since you understood it mistakenly. Your Tawaaf for the second `Umrah was not valid because the majority of scholars held that a menstruating woman is not allowed to make Tawaaf, and if she did Tawaaf, it would be invalid. The Prophet, sallallaahu ‘alayhi wa sallam, said to ‘Aa’ishah "Do everything a pilgrim does except circumambulating the House until you become pure." [Al-Bukhari and Muslim]
Thus, you are still in the state of Ihraam and you must quit everything a pilgrim in the state of Ihraam quits. Then, go to Makkah in order to perform Tawaaf for ‘Umrah and make Sa‘y between As-Safa and Al-Marwah since your first Sa‘y was not valid. That is because Sa‘y must be made after Tawaaf. After that, end your Ihraam for ‘Umrah by shortening your hair. If you failed to return to Makkah, you take the ruling of the pilgrim who is prevented from completing his rituals. Consequently, you have to slaughter a sacrificial animal and end your Ihraam. Allaah The Almighty Says (what means): {But if you are prevented, then [offer] what can be obtained with ease of sacrificial animals.}[Quran 2:196] If you cannot afford slaughtering a sacrificial animal, you have to fast for ten days, according to the opinion of scholars who considered the extra days of the normal menstrual period within fifteen days as menstruation even if it does not happen frequently. As to scholars who stipulated recurrence of the extended menses in order to consider it a normal menstrual period, such as Hanbali scholars; according to their opinion, the blood you had seen in that time is vaginal bleeding outside menses, and hence, your rituals were valid. The first opinion, however, is safer.