Narrated 'Aisha (radiallaahu `anhaa):
We performed Hajj with the Prophet (sallallaahu `alayhi wasallam) and performed Tawaf-al-ifada on the Day of Nahr (slaughtering). Safiya (radiallaahu `anhaa) got her menses and the Prophet (sallallaahu `alayhi wasallam) desired from her what a husband desires from his wife. I said to him, "O Allah's Apostle (sallallaahu `alayhi wasallam)! She is having her menses." He said, "Is she going to detain us?" We informed him that she had performed Tawaf-al-Ifada on the Day of Nahr. He said, "(Then you can) depart."
When the pilgrim wants to leave Makkah and go back to his country, he should not leave until he has performed the farewell tawaaf (tawaaf al-wadaa’), because the Prophet (peace and blessings of Allaah be upon him) said: “No one should leave until the last thing that he does is (tawaaf) around the House.” Narrated by Muslim, 1327). According to another version, he told the people that the last thing they should do was (tawaaf) around the house, but he made an exception for women who were menstruating. Narrated by al-Bukhaari, 1755; Muslim, 1328.
Women who are menstruating or bleeding following childbirth do not have to do the farewell tawaaf; neither should they stand by the door of al-Masjid al-Haraam to bid farewell, because that was not narrated from the Prophet (peace and blessings of Allaah be upon him). This is one of the allowances that sharee’ah makes to women. Women who are menstruating can go back to their families even if they have not done the farewell tawaaf, so give thanks to Allaah for this allowance and blessing.
The last thing the pilgrim should do when he wants to leave is to circumambulate the House. If after the farewell tawaaf he stays and waits for his companions or to load his luggage or to buy something he needs on the way, there is nothing wrong with that, and he does not have to repeat the tawaaf, unless he intends to delay his journey, such as if he intended to travel at the beginning of the day and he did the farewell tawaaf, then he delays his travelling until the end of the day, for example; in this case he has to repeat the tawaaf so that it will be the last thing he does in Makkah.