Jack Dorsey revolutionized online socializing by co-founding Twitter in 2006. Now he wants to transform the way people exchange money.

Dorsey is leading a new startup called Square. Its first product resembles a cube: a tiny credit card terminal that plugs into the headphone jack of an iPhone.

The goal is to make it easier to complete a credit card transaction, whether you’re a street vendor selling T-shirts or an individual settling a lunch tab with a friend.

Dorsey, who was Twitter’s CEO until October 2008 and remains the social network’s chairman, said he came up with the idea for Square nearly a year ago with Jim McKelvey, a glass artist who was frustrated after losing out on a $2,000 sale because he was unable to accept a credit card.

The two started brainstorming about how businesses and individuals could quickly start accepting credit, debit and prepaid cards over the iPhone and other small electronics and had the idea for a credit card reader that connects to a cell phone.

Eventually, McKelvey and a group of engineers decided they should build a gizmo that hooks up to a standard audio jack, which is common on all sorts of consumer electronics from iPhones to BlackBerrys to laptops.

In January, electronic payment services company VeriFone Holdings Inc. plans to release a service similar to Square’s.

That service, PayWare Mobile, is aimed at small businesses and fits a credit card terminal and small stylus (for signatures) into an iPhone case.

A business often needs to have its own merchant account with a credit card company to use one of these methods, though. Square Inc. takes a different tack: It has its own merchant account, so it takes on the responsibility for minimizing risk and fraud, Dorsey said.