The Prophet ﷺ said, "Had I wished, I could have taken payment for it."
حدثنا عمرو الناقد حدثنا سفيان عن عمرو عن سعيد بن جبير عن ابن عباس
عن النبي ﷺ {قال لو شئت لاتخذت عليه أجرا}
Its isnad is sahih, and its narrators are trustworthy and well-known. Suyuti attributed the hadith in Durr Manthur to Ibn Hibban, Hakim, and Ibn Mardawayh, 5/427.