The cable's serial number is printed on its external housing, next to the words 'Designed by Apple in California. You can verify that you're using the correct version of the Apple USB-C Charge Cable with your Mac notebook and its USB-C AC Adaptor. USB-C cables rated for 29W or 30W will work with any USB-C power adaptor, but won't provide enough power when connected to a power adaptor that is more than 61W, such as the 96W USB-C Power Adaptor.
If you use a higher wattage USB-C cable, your Mac will still charge normally. For the best charging experience, you should use the USB-C charge cable that comes with your Mac notebook.