كتاب النكاح
16  
The Book of Marriage
(16)
Chapter: The command to accept invitations
(16)
باب الأَمْرِ بِإِجَابَةِ الدَّاعِي إِلَى دَعْوَةٍ ‏
Sahih Muslim 1431

Abu Haraira (Allah be pleased with him) reported Allah's Messenger (ﷺ) as saying:

If any one of you is invited, he should accept (the invitation). In case he is fasting, he should pray (in order to bless the inmates of the house), and if he is not fasting he should eat.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا حَفْصُ بْنُ غِيَاثٍ، عَنْ هِشَامٍ، عَنِ ابْنِ سِيرِينَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِذَا دُعِيَ أَحَدُكُمْ فَلْيُجِبْ فَإِنْ كَانَ صَائِمًا فَلْيُصَلِّ وَإِنْ كَانَ مُفْطِرًا فَلْيَطْعَمْ ‏".
Reference : Sahih Muslim 1431
In-book reference : Book 16, Hadith 123
USC-MSA web (English) reference : Book 8, Hadith 3348
  (deprecated numbering scheme)