The Messenger of Allah ﷺ said, "Allah has guaranteed for the one who goes out to strive in His path, driven by nothing but striving in His path and belief in His word, that He will either admit him into Paradise or return him to the dwelling from which he set out, along with whatever reward or spoils of war he has gained."
أخبرنا محمد بن سلمة والحارث بن مسكين قراءة عليه وأنا أسمع عن ابن القاسم قال حدثني مالك عن أبي الزناد عن الأعرج
أن رسول الله ﷺ قال تكفل الله عز وجل لمن جاهد في سبيله لا يخرجه إلا الجهاد في سبيله وتصديق كلمته بأن يدخله الجنة أو يرده إلى مسكنه الذي خرج منه مع ما نال من أجر أو غنيمة
Bukhari transmitted it, chapter on the fifth of war booty, section on the saying of the Prophet ﷺ, "spoils of war have been made lawful for you," hadith no. 3123, from the hadith of Malik through this route, and it is also in Al-Kubra, hadith no. 4330, and in Muwatta (Yahya