Could be the charger cord, could be the battery or it could be the port.
First try a different charger cord. If it still gives you issues, then you are looking at either replacing the battery or having the port replaced. So in the case of that I would see a tech.