The money thing is an endlessly fascinating and debatable topic. It occurs to me that there is simply a private currency system unsanctioned by the federation. The federation, as in, the government entity based on earth, doesn't believe in currency based economics. BUT...the bar where Kirk got his ass kicked does. As did anyone who wanted that establishment's brand of alcohol. Same with those cargo ships.
Kinda like bitcoin I guess. Federation citizens are free to trade in whatever if they wish, but the federation itself will have absolutely nothing to do with it. Not even to regulate it, as it's mere existence is contrary to official doctrine.