Remote API - create_domain

I am using PHP curl to create a domain via the Remote API. The problem is that after the domain is created, the server (FCGId) restarts and that closes the connection. Hence I am unable to show the success screen or even redirect to the success screen. Is there something that I am missing here?