Ayesha reported,

Hamza bin Amr al-Aslami asked the Messenger of Allah ﷺ, "Should I fast while traveling?" He used to fast frequently.The Messenger of Allah ﷺ replied, "If you wish, then fast, and if you wish, then break your fast."

Azami 4586

Sahih

عن عائشة

أن حمزة بن عمرو الأسلمي، قال لرسول الله ﷺ: أأصوم في السفر؟ وكان كثير الصيام، فقال له رسول الله ﷺ: إن شئت فصم، وإن شئت فأفطر.

الأعظمي 4586صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
What is permitted and what is not permitted for the fasting person
Section
Traveler's choice between fasting and breaking the fast
Numbering
Jami al-Kamil 4586 (2nd edition)
Azami 4586