In many but not all jurisdictions, hiring someone to have sex is illegal.
However, Alice might want (or settle for) a sperm donation. That is legal in many jurisdictions. In fact I don't know of anywhere that it is illegal, although there might be such a place.
When this is done via an organization such as a fertility center, there is often a contract. The provisions of such a contract vary, but one common provision is that the sperm donor will not be liable for child support. Not all jurisdictions will accept such a contract, as shown in this CNN story. In that case a court later ruled that no support was due according to this BBC story
Some US states have laws governing and regulating such situations. But none of them that I have found make it a crime.
Edit: To rephrase is somewhat more gender-neutral terms:
Paying someone to have sex with the intent that a child results woulds be solicitation of prostitution. and would be illegal in any jurisdiction where such solicitation is illegal -- the law would not recognize any difference. Moreover, if the party who is paying and wishes to wind up with the child is male, in some jurisdictions there are also laws against paying to obtain custody of a child. Such laws are aimed at 'baby-selling" but might be invoked in such a case.
If the plan is to pay someone for a gamete donation, and/or for surrogate parent services, that would not be prostitution, and is legal in many jurisdictions. But there may be unexpected issues of parental rights and obligations. A written contract would be a good idea, and the local law should be checked to see how it handles such arrangements. Depending on the details, medical assistance may be required. A doctor will probably insist on a written contract, and may have knowledge about agreements that have previously worked, or not worked, in the local jurisdiction.