UK/USA custody

Does anyone know how child custody works from two different countries? I want to divorce my husband and move back to the UK but I'm currently pregnant. When I first found out I was pregnant, he announced that he didn't want the baby. I didn't give him a choice, seeing as its my body and I'm keeping this child. But I know if I divorce him, then he will try for custody. Which won't be a fight because I will allow joint custody if it comes to that, but I'm confused as to how it works. I don't work, and will only have the money for me to fly back home and then I'm moving back in with my parents, who are helping with the baby. Would my (ex)husband have to pay for flights to collect baby if/when he wants to see them? I don't have the money for that as all money I do have is going towards the divorce and getting myself and my unborn baby to a safe place where they will be loved by everyone around them. No idea how this would work. And this is if he even wants custody! He said he doesn't care for the child already!