The Messenger of Allah ﷺ said, "I have been commanded to fight the people until they testify that there is no god but Allah and that Muhammad is the Messenger of Allah, and until they establish the prayer and pay the zakat. If they do so, their blood and property are protected from me, except for what is due by right, and their reckoning is with Allah."
أن رسول الله ﷺ قال: أمرت أن أقاتل الناس حتى يشهدوا أن لا إله إلا الله، وأن محمدا رسول الله، ويقيموا الصلاة، ويؤتوا الزكاة، فإذا فعلوا ذلك عصموا منى دماءهم وأموالهم إلا بحقها، وحسابهم على الله.
Bukhari related it in the Book of Faith (25), and Muslim in the Book of Faith (22), both of them through the route of Shubah, from Waqid bin Muhammad bin Zayd bin Abdullah bin Umar, from his father, from Abdullah bin Umar, who said, then he mentioned it.