Some men from the Ansar sought permission from the Messenger of Allah ﷺ, saying, "Messenger of Allah, allow us to waive the ransom of our nephew Abbas."He replied, "Do not leave a single dirham of it."
أن رجالا من الأنصار استأذنوا رسول الله ﷺ فقالوا: يا رسول الله، ائذن فلنترك لابن أختنا عباس فداءه، فقال: لا تدعون منها درهما.
Bukhari reported it in the Book of Jihad and Military Expeditions (3048) from Ismail bin Abu Uways, who said, Ismail bin Ibrahim bin Uqba narrated to us, from Musa bin Uqba, from Ibn Shihab, who said, Anas bin Malik narrated to me, and he mentioned it.