Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:2:237

And if you divorce them before you have touched them and you have already specified for them an obligation, then ˹give˺ half of what you specified - unless they forego the right or the one in whose hand is the marriage contract foregoes it. And to forego it is nearer to righteousness. And do not forget graciousness between you. Indeed Allah, of whatever you do, is Seeing.  

And if you divorce them before you have touched them, and you have already appointed for them an obligation, then one-half of what you have appointed, must be given to them and the other half returns to you; unless it be that they, the women, make remission, and forgo it, or he makes remission, by leaving her the entire amount, the one in whose hand is the knot of marriage, the husband to be, or as Ibn ‘Abbās is reported to have said, ‘The legal guardian, where the female is a minor’; in which case nobody would be at fault; yet that you should remit (wa-an ta‘fū is the subject) is nearer to piety (aqrabu li’l-taqwā is its predicate). Forget not kindness between you, that is, to be bountiful towards one another; surely God sees what you do, and will requite you accordingly.
القرآن:٢:٢٣٧

وَإِنْ طَلَّقْتُمُوهُنَّ مِنْ قَبْلِ أَنْ تَمَسُّوهُنَّ وَقَدْ فَرَضْتُمْ لَهُنَّ فَرِيضَةً فَنِصْفُ مَا فَرَضْتُمْ إِلَّا أَنْ يَعْفُونَ أَوْ يَعْفُوَ الَّذِي بِيَدِهِ عُقْدَةُ النِّكَاحِ ۚ وَأَنْ تَعْفُوا أَقْرَبُ لِلتَّقْوَىٰ ۚ وَلَا تَنْسَوُا الْفَضْلَ بَيْنَكُمْ ۚ إِنَّ اللَّهَ بِمَا تَعْمَلُونَ بَصِيرٌ  

{وإن طلقتموهن من قبل أن تمسوهن وقد فرضتم لهن فريضة فنصف ما فرضتم} يجب لهن ويرجع لكم النصف {إلا} لكن {أن يعفون} أي الزوجات فيتركنه {أو يعفو الذي بيده عقدة النكاح} وهو الزوج فيترك لها الكل، وعن ابن عباس: الولي إذا كانت محجورة فلا حرج في ذلك {وأن تعفوا} مبتدأ خبره {أقرب للتقوى ولا تنسوا الفضل بينكم} أي أن يتفضل بعضكم على بعض {إن الله بما تعملون بصير} فيجازيكم به.