Allaah’s Messenger, sallalaahu `alayhi wa sallam, ordered the giving of Zakaat ul Fitr as a purification for the fasting person from idle talk and obscenity, and as a sustenance for the poor. So whosoever gives it before the prayer (of `Eid) then it is an accepted Zakaat, and whosoever gives it after the prayer, then it is a Sadaqah (charity) from the Sadaqaat.
Reported by Aboo Dawood: Zakaat ul Fitr; #1609
Ibn Maajah: Sadaqatul Fitr; #1827
Ad-Daaraqutnee: Zakaat ul Fitr #1.