From Sahih Muslim (Hadith 4042):
Ibn 'Abbas (Allah be pleased with them) reported:The slave of Banu Bayada cupped Allah's Apostle (ﷺ) and he gave him his wages, and talked to his master and he reduced the charges, and if this earning was unlawful Allah's Apostle (ﷺ) would not have given it
Reference: Muslim 4042