مَا كَانَ لِنَبِىٍّ اَنۡ يَّكُوۡنَ لَهٗۤ اَسۡرٰى حَتّٰى يُثۡخِنَ فِى الۡاَرۡضِؕ تُرِيۡدُوۡنَ عَرَضَ الدُّنۡيَا ۖ وَاللّٰهُ يُرِيۡدُ الۡاٰخِرَةَ ؕ وَاللّٰهُ عَزِيۡزٌ حَكِيۡمٌ(الأنفال :67)
Ma kana linabiyyin an yakoona lahu asra hatta yuthkhina fee alardi tureedoona 'arada alddunya waAllahu yureedu alakhirata waAllahu 'azeezun hakeemun
Sahih International:
It is not for a prophet to have captives [of war] until he inflicts a massacre [upon Allah 's enemies] in the land. Some Muslims desire the commodities of this world, but Allah desires [for you] the Hereafter. And Allah is Exalted in Might and Wise.
Complete Indexing of Quran Topics
We have indexed and found 1 verse about or related to (including the word(s)) "Ransom (Fidyah), for freeing the captives".
For your information, the verse as described above: