What's on Tim Cook's mind? Reuters Apple CEO Tim Cook's admission on his Q2 2014 earnings call that iTunes is now one of the main drivers of Apple was perhaps the most interesting part of the call.

E-commerce — via the music and movies you can get in iTunes, iBooks and the app stores — is Apple's second-fastest growing business right now, up 11% to $4.6 billion in Q2 2014. It lags only the iPhone in growth. E-commerce is also likely Apple's second-most profitable business segment, too.

Put another way, if there was a standalone mobile e-commerce business already doing $4.6 billion in revenues per quarter and growing at 11% a year, people would be clamoring for an IPO. Its CEO would be hailed as a genius.

Rather, Apple appears to be quietly building out an infrastructure to expand this business further, and it could put Apple at the front of e-commerce and mobile payments.

First, here's what Cook actually said on the call:

iTunes software and services revenue continue to grow at a double-digit rate, thanks to an incredible ecosystem and our very large, loyal and engaged customer base. With its strong momentum in growing profitability, iTunes is a very important driver of our business not only here in the United States, but around the world. We now have an almost 800 million iTunes accounts, most of these with credit cards. This is a staggering number.

Bigger than Amazon

Apple's iTunes revenue. Business Insider Eight hundred million credit cards on file — that is a staggering number. Amazon has only a fraction of that number of cards.

Google Ventures partner MG Siegler thinks it's a matter of time before Apple collects 1 billion card numbers:

This is perhaps the most important (and to some extent, most overlooked) part of Apple’s business going forward. They’ll hit a billion very soon.

In fact, Apple is trying to build out its iTunes business into a full-blown e-commerce and mobile payments business, according to Re/code. The company is looking to hire a head of product and head of business development for mobile payments.

On top of that, Apple is building out two other pieces of e-commerce/mobile payment infrastructure: Touch ID and iBeacons.

Your fingerprint is the key

Touch ID on the iPhone 5S. Steve Kovach/Business Insider Touch ID is the most important part of this. Because new iPhones can only be unlocked with your fingerprint, they're completely secure for mobile payments. You can hand your iPhone 5S to a thief, but without your fingerprints he'll never be able to unlock it and start spending money. (Yes, Touch ID can be hacked but it is so difficult to do that most consumers shouldn't worry about it.) In consumers' minds, fingerprints are a step above passwords: Whereas most consumers might feel a mobile wallet is vulnerable inside a lost phone that can be opened with a four-digit passcode, fingerprints just "feel" more secure.

Thus Touch ID sets up iPhone as the premier mobile shopping device — especially as Apple already has an unmatched bank of on-file, one-click credit cards ready to go.

Cook elaborated on this to the Wall Street Journal recently:

I think it’s a really interesting area. We have almost 800 million iTunes accounts and the majority of those have credit cards behind them. We already have people using Touch ID to buy things across our store, so it’s an area of interest to us. And it’s an area where nobody has figured it out yet. I realize that there are some companies playing in it, but you still have a wallet in your back pocket and I do too which probably means it hasn’t been figured out just yet.

Tracking you everywhere you go

iBeacons got a mention at a recent Apple product launch. GigaOM iBeacons are even less well understood than Touch ID. Basically, iBeacons are tiny Bluetooth communicators for very short range signals. You can switch on an app in your iPhone that will detect an iBeacon if you're near it. In theory, if you're in a store, an iBeacon on a shelf of jeans might alert your phone that you can get 10% off those jeans if you paid using your iPhone.

Marketers are salivating at this idea — because in addition to creating new sales the iBeacon/iPhone system might create more data they can use to market more stuff at you.

Put iBeacons together with iAd, Apple's mobile ad system that lets advertisers target iPhone users based on their location — and you can see how interesting and complex Apple's mobile shopping ecosystem is getting.

There are also rumors that Apple wants to do a deal with, or acquire, something like PayPal or Square to further expand its mobile payments abilities.

But right now, that's mostly a pipe dream. iBeacons remain a sort of theoretical product that few people use — even though they're already out there in real life.

A problem Apple can solve

What is real, is obvious: Apple's 800 million credit card asset is one of its least-used assets. The iPhone business looks like it is slowing down. It may get a boost with the iPhone 6, expected in the fall, but analysts worry that new iPhones simply replace old iPhones in the market, and that Apple isn't reaching the biggest-growing markets for phones: The poor in the developing world.

In terms of economics, it would actually be easier for Apple to leverage the iPhone as a mobile payment device, and take a cut of the sales, than it would be to create a new line of devices to succeed the iPhone.

That's why it's so interesting when Cook says he looks at the wallet in his back pocket and sees it as a problem Apple can solve.