Abdullah bin Abbas reported,

The Messenger of Allah ﷺ said on the day of Badr, "Whoever does such and such will receive such and such as a reward from the spoils."The young men rushed forward, while the older men stayed behind to guard the banners and did not leave them. When Allah granted them victory, the older men said, "We were a support for you. Had you been routed, you would have fallen back to us. So do not take all the spoils and leave us with nothing."The young men refused, saying, "The Messenger of Allah ﷺ assigned them to us."Then Allah revealed, "They ask you about the spoils of war. Say, 'The spoils belong to Allah and the Messenger.' So fear Allah and set right the affairs between you, and obey Allah and His Messenger if you are believers" [Anfal 8:1].He says, that was better for them. Likewise, obey me, for I know better than you what the outcome of this matter will be.In another wording, "Whoever kills an enemy combatant will receive such and such, and whoever takes a captive will receive such and such."Wazad added in one narration, the Messenger of Allah ﷺ then divided the spoils equally among them.

Azami 8019

Sahih

عن ابن عباس قال

قال رسول الله ﷺ يوم بدر: من فعل كذا وكذا فله من النفل كذا وكذا قال: فتقدم الفتيان ولزم المشيخة الرايات، فلم يبرحوها فلما فتح الله عليهم قال المشيخة: كنا ردءا لكم لو انهزمتم لفئتم إلينا فلا تذهبوا بالمغنم ونبقى، فأبى الفتيان وقالوا: جعله رسول الله ﷺ لنا فأنزل {يسلونك عن الأنفال قل الأنفال لله والرسول فاتقوا الله وأصلحوا ذات بينكم وأطيعوا الله ورسوله إن كنتم مؤمنين ا} يقول: فكان ذلك خيرا لهم، فكذلك أيضا فأطيعوني؛ فإني أعلم بعاقبة هذا منكم. وفي لفظ: من قتل قتيلا فله كذا وكذا، ومن أسر أسيرا فله كذاوكذا. وزاد في رواية: فقسمها رسول الله ﷺ بالسواء.

الأعظمي 8019صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Spoils of war, anfal, and fay
Section
Ruling on the spoils of war
Numbering
Jami al-Kamil 8019 (2nd edition)
Azami 8019