Sahih al-Bukhari, Book 56, Hadith 254 (Bukhari 2923)
Narrated Anas bin Malik:
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."