I didn't see the submit() is inside the success callback. But in your code, the form will be submitted twice because you are not returning false or doing preventDefault() to cancel the form submission.
But even then, that is not an ideal solution. If the ajax call takes time for some reason, the form submission will also be delayed or not executed at all. You now have a dependency to an external site, ipinfo.io, to always become available. If it is not, then the functionality of the page suffers. The IP address can be determined on the server side anyway. Why not get it from there and get rid of the delay in the form submission?