The Messenger of Allah ﷺ said, "Hospitality is for three days, and the special courtesy is for one day and one night. Whatever is spent on the guest beyond that is charity. It is not permissible for a guest to remain with his host so long that he causes him hardship."
حدثنا ابن أبي عمر حدثنا سفيان عن ابن عجلان عن سعيد المقبري
أن رسول الله ﷺ قال الضيافة ثلاثة أيام وجائزته يوم وليلة وما أنفق عليه بعد ذلك فهو صدقة ولا يحل له أن يثوي عنده حتى يحرجه
[Sahih] Ibn Ajlan was corroborated by Abdul-Hameed bin Jafar, as recorded by Ahmad: 4/31, and the hadith has many routes of transmission in Bukhari and Muslim and others.There are also narrations on this subject from Ayesha [he may be referring to the hadith of Ahmad: 6/69] and Abu Hurairah [Abu Dawud, no. 3749].