You could try to reset the System Management Controller, to see if that helps the new MacBook
12-inch recent 2015 model discover its ability to charge or show the charge effectively...
•Resetting the System Management Controller (SMC) on your Mac - Apple Support
There is so much that one can do, however I'd never attempt to update software in an all-new
computer once it appeared to not be at least 100% charged. To setup the first or admin account
is OK, since you can't tell much about the unit until you can do that; however to test any new item
always is advised no matter the maker.
If you bought the MacBook from an official Apple Store (not just authorized independent reseller)
there should be no problem with returning it within a limited time, for any reason; especially in
the US or Canada. Other regions may vary, especially when there is no official Apple store or an
official Apple Store web site. Independent resellers usually do not honor the 14-day return policy
and have their own pre-buyer warnings about no returns after sale. They can fix issues under the
complementary warranty or some in-house arrangement, in non-Apple reseller locations.
Some resellers of Apple brands (such as best buy or other) may have OK return policy if an item
fails right way, but not the same as the official Apple store or online policies.
The SMC reset may help.
Good luck & happy computing! 🙂