Earth society amongst itself was rid of a need for currency. However, other cultures/species within the galaxy (most notably the Ferengi), still operated under a system of exchange. Anything the Federation couldn’t barter for, required some form of compensation. Credits, however they were denoted, were used to maintain the galactic economic flow. Even on DS9, Federation members were allotted a kind of stipend to be spent with the various merchants.
The whole no money utopia thing happened later. They were still using credits at the time.
Earth society amongst itself was rid of a need for currency. However, other cultures/species within the galaxy (most notably the Ferengi), still operated under a system of exchange. Anything the Federation couldn’t barter for, required some form of compensation. Credits, however they were denoted, were used to maintain the galactic economic flow. Even on DS9, Federation members were allotted a kind of stipend to be spent with the various merchants.