Each variant of a product, such as size, color and other factors, require a common 12-digit universal product code (UPC) prefix number and a unique extension to that variant. Companies must join GS1 US, a nonprofit that sets the standards for international commerce in order to obtain their own identification number that is the first part of the UPC. Aside from the initial fee to join, companies must also pay an annual maintenance fee that varies on the number of unique products you sell. It's easy to see how this can quickly add up.
The other option is to work with a broker that resells UPC codes for reasonable prices. The only downfall is that you're paying to use ones that ultimately are not your own. If you're targeting smaller retailers with just a few products, then you may consider going with a broker who will allow you to use their UPC codes at a lower cost. However, if you're aiming for the large retail stores, they require each company to have their own code for each product.