While the Prophet ﷺ was among us one day, he dozed off briefly, then raised his head smiling. We asked him, "What made you laugh, Messenger of Allah?"He said, "A surah was just revealed to me. Bismillah ar-Rahman ar-Rahim, 'Indeed, We have granted you al-Kawthar. So pray to your Lord and sacrifice. Indeed, your enemy is the one cut off.' [Kawthar 108:1–3]"Then he asked, "Do you know what al-Kawthar is?"We replied, "Allah and His Messenger know best."He said, "It is a river my Lord has promised me in Paradise. Its vessels are more numerous than the stars. My community will come to drink from it, but a servant among them will be snatched away. I will say, 'My Lord, he is from my community.' He will say to me, 'You do not know what they introduced after you.'"
أخبرنا علي بن حجر قال حدثنا علي بن مسهر عن المختار بن فلفل
بينما ذات يوم بين أظهرنا يريد النبي ﷺ إذ أغفى إغفاءة ثم رفع رأسه متبسما فقلنا له ما أضحكك يا رسول الله قال نزلت علي آنفا سورة بسم الله الرحمن الرحيم {إنا أعطيناك الكوثر فصل لربك وانحر إن شانئك هو الأبتر} ثم قال هل تدرون ما الكوثر قلنا الله ورسوله أعلم قال فإنه نهر وعدنيه ربي في الجنة آنيته أكثر من عدد الكواكب ترده علي أمتي فيختلج العبد منهم فأقول يا رب إنه من أمتي فيقول لي إنك لا تدري ما أحدث بعدك
Reported by Muslim, The Prayer, chapter on the argument of those who said that the basmalah is a verse at the beginning of every surah except Baraah, hadith no. 400, from Ali bin Hajar through him, and it is also in Kubra, hadith no. 977.