These things can happen, especially for an accessory with exposed pins. I've had this happen to a few regular USB cables, in fact. You are, however, within your warranty for this accessory as you purchased your iPhone less than a year ago. Your headphones, lightning cable and charging brick all fall under the same warranty as your iPhone. Apple will, of course, examine the cable and verify the type of damage for replacement. They do tend to be more lenient when replacing these though as apposed to the iPhone itself, which is nice. Contact Apple for help with Apple ID account security - Apple Support to have a replacement shipped out to you or to book an appointment at your local Apple Retail Store. If you choose shipping, they will setup express shipping, but will require a hold on a CC to do so as they will be sending the replacement cable in advance with the intent of receiving your current cable in turn. Once you receive the replacement, shipping labels will be in the packaging to ship your cable back. Once received, the hold is removed so long as they don't find some major damage they were not informed of.