The Prophet (ﷺ) ordered the people to pay Zakat-ul-Fitr before going to the `Id prayer.
Sahih al-Bukhari Book 24, Hadith 109