Sa‘d ibn Abi Waqqās (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: “Whoever says when he hears the Muezzin: ‘I bear witness that there is no god but Allah, alone without any partner, and that Muhammad is His slave and Messenger. I am pleased with Allah as a Lord, with Muhammad as a Messenger, and with Islam as a religion,’ his sins shall be forgiven.”
عن سعد بن أبي وقاص -رضي الله عنه- عن النبي -صلى الله عليه وسلم- أنه قال: "من قال حين يسمع المؤذن: أشهد أن لا إله إلا الله وحده لا شريك له وأنَّ محمداً عبده ورسولُه، رضيتُ بالله رباً وبمحمدٍ رسولاً وبالإسلام دِينا، غُفِرَ له ذَنْبُه".
شرح الحديث :
“Whoever says when he hears the Muezzin”, meaning: he hears his call to prayer. “I bear witness that there is no god but Allah, alone.” In other words, I testify, acknowledge, and declare that there is no deity truly worthy of being worshiped except Allah. “Without any partner” is an addition intended for emphasis. “And that Muhammad is His slave.” The word ‘slave’ is mentioned first to show servitude and humility. "And Messenger." This is to demonstrate the bounty of Allah, the Almighty. "I am pleased with Allah as a Lord", meaning: I am pleased with His lordship, divinity, names, and attributes. "With Muhammad as a Messenger", meaning: with all that he brought and conveyed to us. "And with Islam", meaning: with all the rulings of Islam, the commands and prohibitions. “As a religion", meaning: in terms of belief and submission. “His sins shall be forgiven", meaning: the minor sins. This invocation ought to be pronounced when the Muezzin says: "I bear witness that there is no god but Allah; I bear witness that Muhammad is the Messenger of Allah." It may also be said after the Adhān, for the Hadīth can be understood to refer to either of them.