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, establish the prayer, and pay the zakat. If they do so, their blood and wealth are protected from me, except for what Islam rightfully requires, and their reckoning is with Allah."

Azami 6819

Sahih

عن عبد الله بن عمر

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

الأعظمي 6819صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Retaliation and crimes
Chapter
Prohibition of protected blood
Section
Stern prohibition of killing a disbeliever if he accepts Islam and pronounces the two testimonies of faith
Numbering
Jami al-Kamil 6819 (2nd edition)
Azami 6819