If you paid for your last Starbucks (SBUX -0.80%) coffee with cash or a credit card, you're one of a dying breed. According to MarketWatch, 41% of North American customers used a Starbucks card, while another 24% paid with Starbucks' mobile app.

The coffee giant has mastered mobile payments and loyalty rewards in a way that no other company has, be it a retailer or a tech company. In its most recent quarterly report, Starbucks said Mobile Order & Pay transactions, which don't include in-store orders, had doubled year-over-year, and it was processing eight million mobile orders a month. It now has 12 million active loyalty members in the U.S., up 16% from the year before.

Image source: The Motley Fool

Starbucks' rewards program is so popular that the company sparked a minor controversy a few months ago when it changed the way it allocated points from transactions to dollars spent.

The loyalty and mobile payments program is a big reason why Starbucks continues to put up healthy growth numbers, as comparable sales improved 6% in the last quarter, and have grown 5% or more in each of the last 12 quarters. But beyond the customer perspective, there is a hidden advantage to the loyalty program.

Making a dollar out of 15 cents

Starbucks loaded around $1.6 billion on gift cards this past holiday season, and the company estimates that one in seven Americans received one as a gift. Like any savvy business, Starbucks doesn't leave that money sitting in the till to make change. It reinvests it, preferring to earn interest on high-grade corporate bonds, Treasury notes, and certificates of deposit.

Starbucks currently has $1.2 billion in deposits on its books, according to a study by The Wall Street Journal -- more than many financial institutions have, including Discover Financial Services, and more than a third of American Express' holdings.

On breakage income alone, or income resulting from lost or unused gift cards, Starbucks earned $39.3 million last year. That income is equivalent to the estimated operating profit from 320 company-owned stores. With $5 billion in card transactions every year, Starbucks would be able to earn $50 million in interest income with a 1% interest rate. Combined with the breakage income, that would be about $90 million, or the equivalent of about 700 company-owned stores.

While that's still a small percentage of Starbucks' more than 12,000 stores, $90 million is more profit than many smaller restaurant chains have. As of its most recent quarterly report, the company had $1.06 billion in investments on its balance sheet.

That income stream is no accident. CEO Howard Schultz has made the loyalty and mobile payments program a pet project of his, recognizing its value early on. The primary purpose of the rewards program is to generate loyalty and keep customers coming back to Starbucks, but the cash flow from earning interest is a nice bonus.

Now, Starbucks is planning to take its rewards program to the next level. At its shareholder meeting earlier this year, COO Kevin Johnson told the crowd, "Wouldn't it be nice to have a payment card that enabled you to earn Starbucks Stars for every dollar you spent using that card?" To make that happen, the coffee giant is partnering with JPMorgan Chase to introduce the Starbucks Rewards Prepaid Card, "a prepaid, reloadable card, which will allow customers to earn stars anywhere Visa is accepted." The card is expected to be available by the end of the year.

Considering the popularity of the rewards program with its 20 million global members, extending the card to other retailers just makes sense. As Starbucks continues to grow and invents new iterations of its rewards program, not only will loyalty to the brand increase but so will the interest income stream from all those deposits.