How do you tell a child he had a surrogate mother?

Tell when right age. Honesty is always best, but need to address it when child is ready. It is important not to tell them too early as it can lead to unwarranted stress issues. Might want to share this with your child's pediatrician privately, as he/she may have insight as to when the time is right.
Just tell him. Kids understand limitations and medical conditions. "mommy has a condition and it wasn't safe for me to carry you, so we found a wonderful person willing to help." i can be fairly certain your child won't care, unless there are other issues afoot. If they seem unnecessarily hung up about it, consult your pediatrician.