I agree that so long as his health checks out he may have had some bad experience outside that scared him. You are going to have to go back to taking him out on a leash for a while like a puppy and rewarding him for going outside while watching him like a hawk inside. If he has a crate he may need to go into the crate if he didn't go potty outside and then try again in half an hour.