In one narration the wording is: "Were it not for fear of retaliation (qisas), I would have hurt you with this whip." Imam Abu Ya'la recorded all of these narrations, and Imam al-Tabarani recorded something similar, but he recorded these words: "The Prophet (peace and blessings be upon him) called his slave girl," without any doubt, and he recorded these words: "Were it not for fear of retaliation on the Day of Resurrection." The chain of the narration recorded by Imam Abu Ya'la and al-Tabarani is jayyid (good).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب البعث / 18411