Apple-branded accessories, including Apple Pencil, are covered under the Apple One Year Limited Warranty for accessories. You can repair or replace the battery in your Apple Pencil for a fee, or for free if it's covered by the warranty or consumer law.