I had the same issue it started shutting down at around 30 to 40% and of course it very conveniently started doing this to weeks after my warranty expired and after about four times I chatted with Apple and requested an exception the gentleman said technically it wasn't allowed but they made me do a diagnostic check by sending a link to the phone and they saw that there was a power issue and since I have many Apple devices he spoke to a supervisor and they authorized an exception and told me to go to the store. I went to the Fifth Avenue 24 hour store around 4 AM and I got a nice guy who said technically he should take the phone and for a couple days and just switch the battery but he did me a favor and just swapped out for one of the phones and those white boxes I don't know if it's refurbished or not.
However lo and behold just two weeks later I'm now having the same issue with my phone into the diagnostic check again and it says the same issue and I requested an exception from Apple saying the repair was just done and they only offered to send me the overnight box that's empty and I have to send my phone back so they're leaving me without a phone for about a week that's some service Apple.
I'm still holding onto it because I really don't have the ability to be without a phone and I can't make it out to the Apple Store anytime soon. I have an iPhone five and it also started up for me after updating to iOS seven which I delayed until just about a week before this started happening in January so I don't for a fact it wasn't a hardware issue since it was perfect on iOS 6 and iOS 7 is incredibly buggy and everyone I spoke to including a senior support technician said they had heard nothing about this and they said that if it is the same issue I won't be charged for the repair when I send my phone back.
Just my two cents but I have the original MacBook Pro and I drop that thing a bunch of times and it's been through **** and it's still going strong seven years later but everything of apples that I bought since has been just crap and is like everything else which is built to fail on you so you have to buy a new one, this includes my mid-2009 MacBook Pro which had multiple hardware issues including A complete failure of the logic board and hard drive and trackpad and battery all in one night in two weeks before one of my licensing exams for having had the AppleCare I would've been screwed but the kicker is I had the tiniest dent in the corner which had nothing to do with it and I had to plead with Apple to repair the computer because they said it was likely accidental damage and they ended up doing A tier 3 replacement which was $1400 which they waved which is pretty ludicrous considering I paid 1800 for the laptop two years before the issue happened plus the 350 for AppleCare.