Mobile payments firm Square made a loss of “at least $20 million” on its high-profile deal with coffee chain Starbucks in 2013, according to The Wall Street Journal.

Signed in 2012, the agreement with Starbucks was supposed to diversify the payments firm away from its small-business base and push it into the big league of corporate customers.

The deal did deliver billions of dollars in transactions but Square only charged a fee of just over 2 per cent to process each transaction, according to two people familiar with the firm’s financial statements.

Starbucks did not comment

The same report said Square has discussed a possible sale to Google because it is running out of cash.

Discussions between the two companies about an acquisition took place earlier this year, said the report which spoke to three people familiar with the matter.

Previously, Square and Google executives met in 2012 to discuss a possible sale. However, it is unclear if talks are ongoing.

Square is headed by Jack Dorsey (pictured).

The report adds the five-year old payments firm also held less formal discussions with Apple and eBay.

However, the claim has been strongly denied by Square.

Aaron Zamost, the company’s director of corporate communications, tweeted: “We are not, nor have we ever been in acquisition talks with Google, and while we appreciate that Square may be an attractive target have never seriously considered selling to anyone or been in any talks to do so.”

But according to the Journal report, Square recorded a loss of roughly $100 million in 2013, larger than its loss in 2012.

Square would sell for several billions of dollars.

The firm’s dongle transforms smartphones and tablets into cash registers and has proved popular with small shops and businesses. More recently Square has attempted to branch out to bigger retailers and higher-margin services but the showcase deal with Starbucks has not panned out as well as it expected.

The company handled more than $20 billion in payments from businesses last year, yielding revenues of approximately $550 million, according to sources.

But Square’s business model has thin margins. Of the processing fee it charges retailers, about four-fifths is handed over to credit card firms such as Visa and MasterCard, as well as other financial intermediaries.

A Square executive told a potential acquirer earlier this year that the company had nine months of funding before it needed to access a cushion of funds set aside as a last resort, according to a person with direct knowledge of the conversation.

However, this month Square secured a credit facility of more than $100 million from a group of five banks led by Goldman Sachs, giving it more breathing space.