Abu Hurairah reported the Apostle of Allaah ﷺ as saying “Whatever town you come to and stay in , your portion is in it, but whatever town disobeys Allaah and His Apostle a fifth of it goes to Allaah and His Apostle and what remains is yours.” (Using translation from Abū Dāʾūd 3036)
وَقَالَ رَسُولُ اللهِ ﷺ أَيُّمَا قَرْيَةٍ أَتَيْتُمُوهَا فَأَقَمْتُمْ فِيهَافَسَهْمُكُمْ فِيهَا وَأَيُّمَا قَرْيَةٍ عَصَتِ اللهَ وَرَسُولَهُ فَإِنَّ خُمُسَهَا لِلَّهِ وَرَسُولِهِ ثُمَّ هِيَ لَكُمْ