Muaz reported that the Messenger of Allah ﷺ sent him and said, "...Inform them that Allah has made charity obligatory upon them, to be taken from their wealthy and given back to their poor."
إن معاذا قال: بعثني رسول الله ﷺ فقال… فأعلمهم أن الله افترض عليهم صدقة تؤخذ من أغنيائهم، فترد على فقرائهم.
Bukhari narrated it in the Book of Zakat (1458), and Muslim in the Book of Faith (19), both through Yahya bin Abdullah bin Sayfi, from Abu Mabad, from Ibn Abbas, who related it as part of a long hadith.