The Messenger of Allah (ﷺ) prescribed the sadaqah (alms) relating to the breaking of the fast as a purification of the fasting from empty and obscene talk and as food for the poor. If anyone pays it before the prayer (of 'Id), it will be accepted as zakat. If anyone pays it after the prayer, that will be a sadaqah like other sadaqahs (alms).
Hadith Text
The Messenger of Allah (ﷺ) prescribed the sadaqah (alms) relating to the breaking of the fast as a purification of the fasting from empty and obscene talk and as food for the poor. If anyone pays it before the prayer (of 'Id), it will be accepted as zakat. If anyone pays it after the prayer, that will be a sadaqah like other sadaqahs (alms).
Source Reference
Book: Zakat (Kitab Al-Zakat)
Author: Sunan Abi Dawud
Hadith: Sunan Abi Dawud 1609
Scholarly Commentary
This hadith establishes the obligation of Zakat al-Fitr, which is a specific charity due at the conclusion of Ramadan. The wisdom behind this legislation is twofold: it serves as purification for the fasting person from any idle or indecent speech they may have engaged in during Ramadan, and it provides nourishment for the poor so they may celebrate Eid without need.
The timing of this payment is of paramount importance. When discharged before the Eid prayer, it fulfills the specific religious obligation (Zakat al-Fitr) and is accepted as such. If delayed until after the prayer, it becomes a general voluntary charity (sadaqah) and does not fulfill the obligatory nature of Zakat al-Fitr, though the donor still receives reward for charity.
Classical scholars emphasize that this ruling demonstrates the importance of timely fulfillment of religious duties and the concern Islam shows for the welfare of all community members, particularly the impoverished, during times of celebration.