Ibn Umar said, "The Messenger of Allah ﷺ reviewed me for combat on the day of Uhud when I was fourteen years old, and he did not permit me to fight. Then he reviewed me on the day of the Trench when I was fifteen, and he allowed me to take part."Nafi said, "I came to Umar bin Abdul-Aziz, who was the caliph at that time, and related this hadith to him. He said, 'This indeed marks the boundary between the young and the grown.' He then wrote to his governors instructing them to allot stipends to anyone who had reached fifteen years of age, and to count anyone younger than that among the dependents."
عرضني رسول الله ﷺ يوم أحد في القتال، وأنا ابن أربع عشرة سنة، فلم يجزني، وعرضني يوم الخندق، وأنا بن خمس عشرة سنة، فأجازني، قال نافع: فقدمت على عمر بن عبد العزيز وهو يومئذ خليفة، فحدثته هذا الحديث، فقال: إن هذا لحدبين الصغير والكبير، فكتب إلى عماله أن يفرضوا لمن كان ابن خمس عشرة سنة ومن كان دون ذلك فاجعلوه في العيال.
Bukhari reported it in the Book of Testimonies (2664), and Muslim in the Book of Leadership (1868:91), both of them via Ubaydullah, from Nafi, from Ibn Umar. The wording given here is Muslim's.