I heard the Messenger of Allah ﷺ say, "Whoever builds a mosque for Allah in which the name of Allah the Exalted is mentioned, Allah will build for him a house in Paradise in return."
سمعت رسول الله ﷺ يقول: ومن بنى لله مسجدا يذكر فيه اسم الله تعالي، بني الله له به بيتا في الجنة.
Ahmad (126), Ibn Majah (7325, 758), Ibn Abu Shayba (19902), and Hakim (2/89) all narrated it through various chains from Layth bin Saad, from Yazid bin Abdullah bin Usama bin Hadd, from Walid bin Abu Walid, from Uthman bin Abdullah bin Suraqa, from Umar bin Khattab, who mentioned it in a long hadith. Its isnad is sahih. Hakim said, "This hadith is sahih in isnad." The discussion of it is elaborated in the book on prayer.