LendingClub, a fintech company that pioneered personal loans made online, is buying a U.S. bank to give it access to a stable and cheaper source of funding, CNBC has learned.

LendingClub is paying $185 million in cash and stock for Radius Bancorp, according to documents viewed by CNBC. Radius, a Boston-based online bank with about $1.4 billion in assets, is among a cohort of small lenders that have partnered with fintech firms who need the services of an FDIC-regulated institution.

The move marks the first time a U.S. fintech company has acquired a bank. Fintech firms from Robinhood to Square have applied for ways to become banks as doing so would give them better profit margins and the ability to issue new products like checking accounts. Last week, mobile bank Varo Money got FDIC approval for a national bank charter, which would allow it to accept consumer deposits.

LendingClub, which calls itself the biggest U.S. provider of personal loans, had been a leader in an earlier wave of fintech firms focused on marketplace lending, or matching borrowers with lenders. The company had the biggest U.S. tech IPO of 2014, soaring to an $8.5 billion valuation. But it was dealt a blow in 2016 when founder Renaud Laplanche was ousted amid irregularities with loan practices, and its shares have never recovered.

Now, the fintech disruptor is poised to reinvent itself as a bank.

The deal will allow San Francisco-based LendingClub to offer new products to its clients, diversify its earnings and reduce or eliminate the use of institutional funding sources, according to the documents.

"What a bank charter does for LendingClub is it allows us to take what is the leading digital loan provider online and combine it with a leading digital deposit gatherer," Scott Sanborn, CEO of LendingClub, said Tuesday on CNBC. "It totally changes the earnings profile of this business."

Sanborn said that the deal will help save $40 million a year in bank fees and funding costs and will allow the company to earn a spread on loans kept on its balance sheet, which is a core way banks earn money.

The transaction is expected to take 12 to 15 months to close and will reach breakeven for the acquirer two years after that, according to LendingClub. JPMorgan Chase advised LendingClub on the takeover.

As part of efforts to clear its path to becoming a regulated bank, the company has asked its largest shareholder, Asian investment firm Shanda, to trade its 22% stake in LendingClub for nonvoting shares.