It is narrated from Yazid bin Hurmaz that Najdah wrote a letter to Ibn Abbas (may Allah be pleased with them both) asking: Did the Messenger of Allah (ﷺ) allow women to participate in battles? And was any share (from the spoils of war) fixed for them? Ibn Abbas (may Allah be pleased with them both) replied that the Messenger of Allah (ﷺ) used to bring women along in battles; they would treat the wounded, and he (ﷺ) did not allocate any fixed share for them, but he would certainly give them something from the spoils.
Hadith Referenceمسند الإمام الشافعي / كتاب الجهاد وقسم الغنائم / 1763
Hadith Takhrijصحيح اخرجه البيهقي : 29/9 ، 30 وفى المعرفة السنن والآثار له (5306) ، (5345)۔