Some Ansari men asked permission from Allah's Messenger (ﷺ) saying, "O Allah's Messenger (ﷺ)! Allow us not to take the ransom of our nephew Al `Abbas. The Prophet (ﷺ) replied, "Do not leave a single Dirham thereof."
Sahih al-Bukhari Book 56, Hadith 254