Once the Prophet (ﷺ) got his blood out (medically) and paid that person who had done it. If it had been illegal, the Prophet (ﷺ) would not have paid him.
Sahih al-Bukhari Book 34, Hadith 56