Sunan an-Nasa'i, Book 22, Hadith 205 (In-Book)

It was narrated from Hamza bin 'Amr Al-Aslami that: he asked the Messenger of Allah about fasting while traveling. He said: "If," then he said something to the effect that: "If you want, then fast, and if you want, then do not fast.

أَخْبَرَنَا مُحَمَّدُ بْنُ رَافِعٍ، قَالَ حَدَّثَنَا أَزْهَرُ بْنُ الْقَاسِمِ، قَالَ حَدَّثَنَا هِشَامٌ، عَنْ قَتَادَةَ، عَنْ سُلَيْمَانَ بْنِ يَسَارٍ، عَنْ حَمْزَةَ بْنِ عَمْرٍو الأَسْلَمِيِّ، أَنَّهُ سَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنِ الصَّوْمِ فِي السَّفَرِ قَالَ ‏ "‏ إِنْ - ثُمَّ ذَكَرَ كَلِمَةً مَعْنَاهَا إِنْ - شِئْتَ صُمْتَ وَإِنْ شِئْتَ أَفْطَرْتَ ‏" ‏ ‏.‏

sunnah.com