Ayesha reported,

The Messenger of Allah ﷺ used to test them. It has reached us that when Allah Most High revealed that the Muslims should return to the polytheists what they had spent on those of their wives who had emigrated, and decreed for the Muslims that they should not hold on to the marriage ties of disbelieving women, Umar divorced two wives, Qaribah bint Abu Umaya and the daughter of Jarwal al-Khuzai. Muawiya then married Qaribah, and Abu Jahm married the other.When the disbelievers refused to acknowledge paying back what the Muslims had spent on their wives, Allah Most High revealed, "And if any of your wives has gone over to the disbelievers, and then you have your turn" [Mumtahanah 60:11]. The "turn" refers to what the Muslims paid to those whose wives had emigrated from among the disbelievers. So it was commanded that whoever lost a wife to the disbelievers be given, from the dowries of the disbelieving women who had emigrated, the equivalent of what he had spent.We do not know of any of the women who emigrated who apostatized after her belief.It has reached us that Abu Basir bin Usayd al-Thaqafi came to the Prophet ﷺ as a believer and an emigrant during the period of the truce. Akhnas bin Shariq wrote to the Prophet ﷺ requesting Abu Basir back, and the rest of the hadith was mentioned.

Bukhari 2733

Sahih

وقال عقيل عن الزهري قال عروة

فأخبرتني عائشة

أن رسول الله ﷺ كان يمتحنهن وبلغنا أنه لما أنزل الله تعالى أن يردوا إلى المشركين ما أنفقوا على من هاجر من أزواجهم وحكم على المسلمين أن لا يمسكوا بعصم الكوافر أن عمر طلق امرأتين قريبة بنت أبي أمية وابنة جرول الخزاعي فتزوج قريبة معاوية وتزوج الأخرى أبو جهم فلما أبى الكفار أن يقروا بأداء ما أنفق المسلمون على أزواجهم أنزل الله تعالى {وإن فاتكم شيء من أزواجكم إلى الكفار فعاقبتم} والعقب ما يؤدي المسلمون إلى من هاجرت امرأته من الكفار فأمر أن يعطى من ذهب له زوج من المسلمين ما أنفق من صداق نساء الكفار اللائي هاجرن وما نعلم أن أحدا من المهاجرات ارتدت بعد إيمانها وبلغنا أن أبا بصير بن أسيد الثقفي قدم على النبي ﷺ مؤمنا مهاجرا في المدة فكتب الأخنس بن شريق إلى النبي ﷺ يسأله أبا بصير فذكر الحديث

البخاري 2733صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Conditions
Chapter
Conditions in jihad and reconciliation with the people of war, and the writing of conditions
Numbering
Darussalam 2733
Bukhari 2733