Hello and Welcome. My name is Michael.
If you just recently lost the functionality of charging the battery through the camera, I strongly suggest to Reset your Powershot Sx400IS to Factory Default Settings. By doing so, it most possibly reset all sensors and its functionality back in place.
Turn ON your Canon PowerShot SX400 IS and press the [Menu] button to open the menu in the viewfinder window. Press the right arrow once to highlight the “Tools” tab. Select ‘Reset All’ and then press the [Func. Set] button. When the display ask you “Reset settings to default?” turn turn the dial to choose ‘OK’ and then press the [Func. Set] button.
Please let me know if there is anything else I can help you on this matter.Thank you.