Surrogacy can be allowed under certain conditions :
1. The woman must have a marriage contract with the man whether temporary or permanent during the time of formation or implanting of the zygote , i.e. when the semen of the man is put with the ovum of the woman. They must be Halal for each other and not outsiders (Non Mahram). This means that she can not be married to another person during that time.
2. She must be Muslim or from People of Book ( Ahlul Kitab) with all the conditions of marriage contract.
3. The medical procedure should not involve touching or looking at private parts of opposite gender which is not permissible in Islam.
4. The semen of the man must not be taken by unlawful masturbation e.g. using his own hands etc. Permissible masturbation is possible when his wife, any wife, uses her hands or body to make him ejaculate.
5. The marriage contract between them does not need to remain till the end of the pregnancy. It must be there only during the formation or in planting of the Zygote. But, the husband must pay all the expenses of the woman till the end of the pregnancy and even after it to cover her medical requirements after that.