Riyad as-Salihin, Book 1, Hadith 664 (In-Book)

Ibn 'Umar (May Allah be pleased with them) reported: Whenever we took a pledge of allegiance to Messenger of Allah to hear and obey, he would say to us, "As far as you are capable of."[Al-Bukhari and Muslim].

وعنه قال‏:‏ كنا إذا بايعنا رسول الله صلى الله عليه وسلم على السمع والطاعة يقول لنا‏:‏ “فيما استطعتم” ‏(‏‏(‏متفق عليه‏)‏‏)‏

sunnah.com