Language:
كتاب الإيمان
2  
Belief
(17)
Chapter: (The Statement of Allah Jalla Jalalahu) "But if they repent [by rejecting Shirk (polytheism) and accept Islamic Monotheism] and perform As-Salat (Iqamat-as-Salat) and give Zakat then leave their way free."
(17)
بَابُ: {فَإِنْ تَابُوا وَأَقَامُوا الصَّلاَةَ وَآتَوُا الزَّكَاةَ فَخَلُّوا سَبِيلَهُمْ}
Sahih al-Bukhari 25

Narrated Ibn 'Umar:

Allah's Messenger (ﷺ) said: "I have been ordered (by Allah) to fight against the people until they testify that none has the right to be worshipped but Allah and that Muhammad is Allah's Messenger (ﷺ), and offer the prayers perfectly and give the obligatory charity, so if they perform that, then they save their lives and property from me except for Islamic laws and then their reckoning (accounts) will be done by Allah."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ الْمُسْنَدِيُّ، قَالَ حَدَّثَنَا أَبُو رَوْحٍ الْحَرَمِيُّ بْنُ عُمَارَةَ، قَالَ حَدَّثَنَا شُعْبَةُ، عَنْ وَاقِدِ بْنِ مُحَمَّدٍ، قَالَ سَمِعْتُ أَبِي يُحَدِّثُ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ أُمِرْتُ أَنْ أُقَاتِلَ النَّاسَ حَتَّى يَشْهَدُوا أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللَّهِ، وَيُقِيمُوا الصَّلاَةَ، وَيُؤْتُوا الزَّكَاةَ، فَإِذَا فَعَلُوا ذَلِكَ عَصَمُوا مِنِّي دِمَاءَهُمْ وَأَمْوَالَهُمْ إِلاَّ بِحَقِّ الإِسْلاَمِ، وَحِسَابُهُمْ عَلَى اللَّهِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 25
In-book reference : Book 2, Hadith 18
USC-MSA web (English) reference : Vol. 1, Book 2, Hadith 25
  (deprecated numbering scheme)