Abdullah bin Abbas reported,

The Messenger of Allah ﷺ said on the day of Badr, "Whoever does such and such will have such and such from the spoils."The young men advanced into battle, while the elders stayed by the banners and did not leave them. When Allah granted them victory, the elders said, "We were a support for you. If you had been defeated, you would have fallen back to us. So do not take all the spoils for yourselves while we are left behind."The young men refused, saying, "The Messenger of Allah ﷺ assigned them to us."So 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 matters between you, and obey Allah and His Messenger if you are truly believers" [Anfal 8:1].He is saying that this was better for them, and so it is in this matter as well. So obey me, for I know better than you the outcome of this affair.In another wording, "Whoever kills an enemy will have such and such, and whoever captures a prisoner will have such and such."Wazad added in another narration that the Messenger of Allah ﷺ then divided the spoils equally among them.

Azami 12349

Sahih

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

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

الأعظمي 12349صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "They ask you about the spoils of war. Say, the spoils of war are for Allah and the Messenger. So fear Allah and amend that which is between you, and obey Allah and His Messenger if you are believers."
Numbering
Jami al-Kamil 12349 (2nd edition)
Azami 12349