Abdullah bin Umar reported,

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 that, their lives and property are protected from me, except for what Islam rightfully requires, and their reckoning is with Allah."

Bukhari 25

Sahih

حدثنا عبد الله بن محمد المسندي قال حدثنا أبو روح الحرمي بن عمارة قال حدثنا شعبة عن واقد بن محمد قال سمعت أبي يحدث

عن ابن عمر

أن رسول الله ﷺ قال أمرت أن أقاتل الناس حتى يشهدوا أن لا إله إلا الله وأن محمدا رسول الله ويقيموا الصلاة ويؤتوا الزكاة فإذا فعلوا ذلك عصموا مني دماءهم وأموالهم إلا بحق الإسلام وحسابهم على الله

البخاري 25صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Faith
Chapter
But if they repent and establish prayer and give zakat, then leave their way free
Numbering
Darussalam 25
Bukhari 25