The Prophet ﷺ said to the delegation of Abdul-Qays, "I command you to pay one-fifth of whatever spoils you acquire." The narrator added that the hadith contains a longer story.
حدثنا قتيبة حدثنا عباد بن عباد المهلبي عن أبي جمرة
أن النبي ﷺ قال لوفد عبد القيس آمركم أن تؤدوا خمس ما غنمتم قال وفي الحديث قصة
Sourced by both Bukhari and Muslim. Bukhari related it in the Book of Times of Prayer, in the chapter on Allah's statement, "Turning to Him in repentance, fear Him, and establish prayer, and do not be among those who associate partners with Him" [Rum 30:31], hadith no. 523, on the authority of Qutayba. Muslim related it as hadith no. 17, from the hadith of Abbad bin Abbad, with similar wording.