How to handle redirection from remote URL

I’m using InAppBrowser in my app to send the user to a remote site for payments. After the payment process is complete, the user is sent to another URL with some parameters to see their receipt. In the lab page I can go to http://localhost:8100/#/receipt. What URL can I use for my device? I tried just localhost (as indicated by ) but I get connection refused.

Thanks for any help