In France for a company with a turnover of up to EUR 500,000 it only costs EUR 85/year, for what I think is up to 1 million codes (you get a root number and can generate the codes yourself).
https://www.gs1.fr/Obtenir-un-code-a-barres/Consultez-nos-ta...