The Messenger of Allah ﷺ made the zakat of Fitr obligatory as a purification for the fasting person from idle talk and indecent speech, and as food for the poor. Whoever pays it before the prayer, it is an accepted zakat, and whoever pays it after the prayer, it is merely one of the ordinary charities.
فرض رسول الله ﷺ زكاة الفطر طهرة للصائم من اللغو والرفث وطعمة للمساكين. من أداها قبل الصلاة فهي زكاة مقبولة، ومن أداها بعد الصلاة فهي صدقة من الصدقات.
Abu Dawud (1609) and Ibn Majah (1827) both narrated it from the hadith of Marwan bin Muhammad, who said, "Abu Yazid Khawlani related to us, from Sayyar bin Abdul-Rahman Sadafi, from Ikrima, from Ibn Abbas," and he mentioned it. Hakim (1/409) graded it sahih and said, "It meets the standard of Bukhari."I say, this is a mistake on his part, for it does not meet the standard of Bukhari. Rather, its chain is hasan, for Abu Yazid Khawlani, who is the Egyptian, and his teacher Sayyar bin Abdul-Rahman, were narrated from by none but Abu Dawud and Ibn Majah, and both of them are truthful.