Starfleet probably has some form of payment to those who serve, but in the Federation, when replicators are included in everyone's home (unless it is specifically taken out or the person building the house chooses not to include it), there's no need for them to carry money.
However, the Federation does come across many places that still use currency, so in order for the people who've signed up for fleet service to get around on those planets, they can withdraw the money in the form of the local currency.
Of course, I'm still fuzzy abou the case of worlds that haven't previously encountered the Federation or in cases like Quark's, where we often see Starfleet officers at the Dabo wheel...
However, the Federation does come across many places that still use currency, so in order for the people who've signed up for fleet service to get around on those planets, they can withdraw the money in the form of the local currency.
Of course, I'm still fuzzy abou the case of worlds that haven't previously encountered the Federation or in cases like Quark's, where we often see Starfleet officers at the Dabo wheel...