Can you provide more information on what you want to do Are you making a payment plugin or testing one ? Or which Payment Plugin are you referring to ?
I'll assume you're tryin to test the webhook/callback from the external site. It won't be able to reach your localhost. You can use ngrok to expose your local webserver on the internet.