Updated

Democratic presidential candidate Hillary Clinton proved Wednesday to be unabashed about accepting millions of dollars in speaking fees from Wall Street firms amid an increasingly competitive race with self-proclaimed "democratic socialist" Vermont Sen. Bernie Sanders.

At a CNN town hall in Derry, N.H., moderator Anderson Cooper asked the former secretary of state, "Did you have to be paid $675,000?", a reference to her fees for three speeches to Goldman Sachs. Clinton responded, "I don't know. That's what they offered."

Clinton went on to say that she accepted the Goldman money after she left the State Department in 2013, when, as she put it, "I wasn't committed to running" for president. An Associated Press analysis of public disclosure forms and records released by her campaign found that Clinton made $9 million from appearances sponsored by banks, insurance companies, hedge funds, private equity firms and real estate businesses.

Clinton made her comments amid an ongoing battle with Sanders over their respective progressive credentials following Clinton's narrow victory in Monday's Iowa Caucuses.

“I don’t know any progressive who has a super PAC and takes $15 million from Wall Street,” said Sanders, whose campaign has been driven by modest contributions and has risen in the polls on his promise of more equality for the middle class.

For her part, Clinton dismissed criticism that she’s not a true progressive and is part of the political establishment.

“I’m not going to let that bother me. I know where I stand,” said Clinton, who argued that the Sanders campaign tagging her as an establishment candidate because she was endorsed by Planned Parenthood was “inappropriate.”

“I am a progressive who gets things done,” Clinton added, before wondering aloud how Sanders came to be a progressive “gatekeeper.” She also disagreed with several aspects of Sanders’ platform, questioning his call for a "political revolution" and his plan to provide universal health care through expanding Medicare. Clinton has said she wants to improve on ObamaCare, not dismantle it.

Despite their philosophical disagreements, both Democratic candidates were in harmony on wanting to keep Republicans out of the White House.

"These guys play for keeps,” Clinton said, while Sanders reserved most of his GOP-related ire for Donald Trump.

“Everybody in this room doesn’t want a right-wing Republican in the White House,” he said. “I want Trump to win the nomination. And frankly, I think we could win against him.”

Though Sanders is running an insurgent campaign, he cited his time on Capitol Hill to answer questions about whether Congress would approve some of his campaign promises and whether Democrats or Republicans better serve veterans.

“I have a history of working with Republicans when there was common ground,” Sanders said, pointing out that he was a member of the Senate Committee on Veterans’ Affairs. However, Sanders acknowledged that he and other members of Congress “should have done better” recognizing and fixing problems with patient care at VA facilities.

Clinton and Sanders agreed on the need to stop the ISIS terror group with the help of a coalition of nations, including Middle Eastern allies. Sanders continued to trumpet his opposition to the war in Iraq, which critics say led to the rise of ISIS. Clinton, who voted to authorize the Iraq War, said Wednesday, “I did make a mistake" in doing so.

Clinton also acknowledged she must do more to appeal to young people -- a voting bloc Sanders won handily in Iowa, saying “I accept the fact that I have work to … convey what I want to do for young people ... They don't have to be for me. I will be for them."

Clinton and Sanders won't clash face-to-face until Thursday's debate at the University of New Hampshire. On Wednesday, each answered about an hour’s worth of questions from voters and moderator Cooper.

Most polls have Sanders holding a substantial lead over Clinton in New Hampshire. The most recent Fox News poll, from late January, shows the Vermont senator with a 22-point cushion.

Fox News.com's Joseph Weber, Fox News Channel's Ed Henry and the Associated Press contributed to this report.