It is narrated from Nafi' (may Allah have mercy on him) that he reports from Ibn Umar (may Allah be pleased with them) that Ibn Umar (may Allah be pleased with them) used to get cupped while fasting, then later he abandoned it.
Hadith Referenceمسند الإمام الشافعي / كتاب الصيام / 656
Hadith Takhrijاسناده صحیح اخرجه مالك في الموطا الصيام، باب حجامة الصائم والبيهقي: 4/ 269 ـ وفي المعرفة السنن والآثار له ، رقم : (2545)۔