The Messenger of Allah ﷺ forbade taking the price of a dog, and if someone comes seeking the price of a dog, fill his palm with dust.
نهي رسول الله ﷺ عن ثمن الكلب وإن جاء يطلب ثمن الكلب فاملأ كفه ترابا.
Abu Dawud (3482) narrated it from Rabi bin Nafi Abu Tuba, who said, Ubaydullah, meaning Ibn Amr, narrated to us, from Abdul-Kareem, from Qays bin Habtar, from Abdullah bin Abbas, and he mentioned it.Imam Ahmad (2512, 2626) and Bayhaqi (6/6) both narrated it, from the hadith of Ubaydullah bin Amr with his chain, with the wording, "The Messenger of Allah ﷺ forbade the price of wine, the earnings of a prostitute, and the price of a dog." He said, "If its owner comes seeking its price, fill his hands with dust."Bayhaqi said, "Abu Dawud narrated it in the Sunan from Abu Tuba, from Ubaydullah bin Amr, in abbreviated form."The meaning of "dust" is deprivation and disappointment, as Khattabi said in Maalim.