I sold it, meaning his camel, to the Prophet ﷺ, and I stipulated that I would ride it back to my family. At the end he said, "Did you think I bargained with you only to take your camel? Take your camel and its price, both are yours."
حدثنا مسدد حدثنا يحيى يعني ابن سعيد عن زكريا حدثنا عامر
بعته يعني بعيره من النبي ﷺ واشترطت حملانه إلى أهلي قال في آخره تراني إنما ماكستك لأذهب بجملك خذ جملك وثمنه فهما لك
No references are available.
Bukhari also narrated it in the Book of Conditions, Chapter: If the seller stipulates riding the animal to a specified place, it is permissible, hadith no. 2718, and Muslim in the Book of Sharecropping, Chapter: Selling a camel while excluding its riding, hadith no. 715 and after it 1599, from the hadith of Zakariya, with the same chain.