It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) ordered the giving of Sadaqat al-Fitr before the people go out to the Eid prayer ground.
Hadith Referenceصحيح ابن خزيمه / جماع أبواب صدقة الفطر فى رمضان / 2423