All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
There is no objection to selling animal semen or receiving compensation for injecting it or inseminating animals. This is true as long as the semen comes from a pure animal that is permissible to sell and buy, other than a dog or a pig. Accordingly, if the whole animal is permissible to sell then part of it is permissible to sell as well. However, the prohibition mentioned by the Prophet Mohammad (peace be upon him) regarding taking hire for stallion`s covering does not apply to the sale of animal semen. The prohibition was specific to ensuring pregnancy, which is not guaranteed. Islamic Sharia has forbidden anything involving ambiguity that could lead to disputes and injustice. Additionally, the semen is not deliverable, known, or within one's capacity to hand over, as mentioned by Ibn Hajar in Fath al-Bari (Vol.4/P. 461).
Moreover, all of these concerns do not apply to the sale of the semen itself, so if the semen is extracted from the animal, there is no objection to its sale.
In addition, we do not see any objection to renting a male animal for a known period or specific times. The lessee benefits during that period by the mating of the male animal with the female of the animals. The justification for the permissibility of this ruling is that the prohibition mentioned in the hadith of Ibn Umar (may Allah be pleased with them) where he said, "The Prophet (peace be upon him) forbade taking hire for stallion`s covering" is specifically referring to renting the male for the purpose of achieving pregnancy, and this falls under the category of prohibited transactions due to the uncertainty of achieving pregnancy.
Likewise, if someone rents a male animal for general use without specifying the benefit, whether it be mating or otherwise, and the lessee uses it in mating with a female as part of a dependent process, this does not fall under the prohibition. Some scholars of the Shafi'i school have mentioned that the prohibition is related to renting the male for the specific purpose of mating with a female, which may or may not happen. However, if the owner of the male is hired to assist in facilitating the mating process and making it easier for the male to mate with the female, then there is no objection in that case.
Ibn Hajar al-Haytami, may Allah have mercy on him, said: "The owner of the female animal can hire the male for a specific payment and a specific period, even if it is just for an hour, to benefit from it as he wishes. This hiring is permissible, as it is analogous to their statements in its chapter. He can fulfill his benefits, even if it involves the male`s mating with the female, because what is not permissible to hire directly becomes permissible as a consequence" [Al-Zawajir, Vol. 1/P. 382].
Al-Shabrāmilīsi, may Allah have mercy on him, said: "The prohibition of hiring (the male) is when it is rented with the intention of mating. If he rents it to benefit from it as he wishes, it is permissible to use it for mating according to its deserving benefit. This is unlike if he rents it for plowing or something similar; it is not permissible to use it for mating, as permission is only granted for its use in what he named it for, like plowing or other purposes" [Hashiyat al-Shabrāmilīsi Ala Nihayat al-Muhtaj, Vol. 3/P. 447].
In conclusion, it is permissible to rent the male animal for a specific amount and period for general benefit and the lease is valid. Moreover, the lessee is allowed to benefit from the male animal for mating as part of the general usage. And Allah the Almighty knows best.