Abu Juhayfa reported,

I asked Ali, "Do you possess any revelation other than what is in the Book of Allah?"He replied, "No, by the One who split the seed and created the soul, I know of nothing except an understanding that Allah grants to a man regarding the Quran, and what is in this document."I asked, "And what is in the document?"He answered, "The rulings on blood-money, the ransoming of captives, and that a Muslim is not to be killed in retaliation for a disbeliever."

Azami 7997

Sahih

عن أبي جحيفة قال

قلت لعلي: هل عندكم شيء من الوحي إلا ما في كتاب الله؟ قال: لا، والذي فلق الحبة، وبرأ النسمة، ما أعلمه إلا فهما يعطيه الله رجلا في القرآن، وما في هذه الصحيفة. قلت: وما في الصحيفة؟ قال: العقل، وفكاك الأسير، وأن لا يقتل مسلم بكافر.

الأعظمي 7997صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Captives
Section
Encouragement to ransom the Muslim captive
Numbering
Jami al-Kamil 7997 (2nd edition)
Azami 7997