You have a warranty directly with Apple for one year from the date of purchase. An issue with charging maybe a defective charging block or a defective cable. That phone is also wireless charging capable. Try some different Chargers and see if maybe one of those work.