Ibn Abbas reported: The Messenger of Allah, peace and blessings be upon him, obligated Zakat al-Fitr as purification of the fasting person from vain talk and misbehavior, as food for the poor. Whoever pays it before the Eid prayer, it is accepted as Zakat. Whoever pays it after the Eid prayer, it is part of voluntary charity.
Source: Sunan Abī Dāwūd 1609
Grade: Sahih (authentic) according to Al-Albani
عَنْ ابْنِ عَبَّاسٍ قَالَ فَرَضَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ زَكَاةَ الْفِطْرِ طُهْرَةً لِلصَّائِمِ مِنْ اللَّغْوِ وَالرَّفَثِ وَطُعْمَةً لِلْمَسَاكِينِ مَنْ أَدَّاهَا قَبْلَ الصَّلَاةِ فَهِيَ زَكَاةٌ مَقْبُولَةٌ وَمَنْ أَدَّاهَا بَعْدَ الصَّلَاةِ فَهِيَ صَدَقَةٌ مِنْ الصَّدَقَاتِ
1609 سنن أبي داود كتاب الزكاة باب زكاة الفطر
3570 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الجامع