'Umar reported me to collect the sadaqah (i.e. zakat). When I became free, he ordered to give me payment for it. I said: I have worked for the sake of Allah. He said: Take what you have been given, for I held an administrative post in the time of the Messenger of Allah (ﷺ), and he gave me payment for it.
Sunan Abi Dawud Book 20, Hadith 17