On the desktop screens at MasterCard Worldwide, you can see the economic pulse of the globe in real time. In the suburban St. Louis control center of MasterCard’s global-payments network, rows of analysts keep watch over the flow of nearly 20 billion transactions a year in 210 countries, more than the United Nations has members. When the matrix of green lights flashes a red spot, the money traffic controllers immediately reroute the transactions to keep commerce flowing. Meanwhile, in suburban New York City, the staff at MasterCard Advisors monitors the payment network, plus surveys and other outside data, to produce bulletins on America’s retail health. In early October, days before retailers released their monthly results, Advisors noted sharply dropping consumer sales during September, with furniture down 13.3% and electronics falling 13.8% from a year ago. “Toward the end of the month the declines were into the high teens,” says vice president Michael McNamara. “That coincided with financial news. Consumers are at the eye of the storm.”

MasterCard is at the center of it as well. Concern about credit card debt is front-page news. The company’s well-being is closely tied to consumer spending and to the fate of its thousands of business partners: the banks. “As the economy and our customers suffer, we’re going to suffer,” says Robert Selander, CEO of MasterCard since 1997. “Our customers’ appetites are going to be very reduced next year because of the new challenges they’re facing.”

For more on MasterCard, watch this Fortune video:

MasterCard, which started in 1966 as a bank-owned entity to promote cards and transmit payments, has been fending for itself since 2006, when it went public. Last year it generated revenue of $4.1 billion, up 24% from 2006, putting it close to entering the Fortune 500 for the first time (it ranked No. 548 last year (2007) on the Fortune 1,000). The company has gained a reputation as a smart competitor, wielding new technology (key fobs as credit cards), memorable advertising (its “priceless” campaign), and global reach (three billion cardholders and offices in 40 countries).

Read More: How MasterCard Is Changing the World

At the same time, the company is being tested by enormous challenges, including the historic worldwide financial crisis, waves of litigation over the fees it charges, and relentless competition from its larger rival, Visa v . (That company, which went public this year, already has the revenues to qualify it for 2009’s Fortune 500.) What makes Selander upbeat in the midst of crisis, however, is talking about potential business he doesn’t have yet from people still using paper money for tens of trillions of dollars’ worth of transactions. “One of the great opportunities, for us and our name-brand competitors, is to grow the pie.” Or in credit card industry talk, to “plasticize” the world.

MAS.10.27.08 Carbon: Comstock 11—Jupiter Images/Comstock Images/Alamy; Strip: PM—Alamy; Thumb: Fingerprint—Alamy

In fact, MasterCard is more like an IT company with great TV commercials. It does not lend money to consumers (its customers, the banks, do that) or set rates for their credit cards, but instead collects fees from banks to electronically zip from banks to merchants the billions of tiny loans and withdrawals we all make every day. The more swipes we make—regardless of whether we can afford that new plasma TV or whether banks will have to write down the loans to us—the more money MasterCard makes.

The company’s journey to independence began in 1998, when the government filed an antitrust suit against both MasterCard and Visa, alleging that their ownership by a network of banks effectively stifled competition between the two of them—they accounted for 75% of all credit card purchases—and kept rivals like American Express axp from doing business with the banks. Visa and MasterCard eventually lost the suit, bringing on more legal action. MasterCard recently settled a suit with American Express for $1.8 billion for damages stemming from the original antitrust case. Discover’s similar suit against MasterCard is scheduled to go to trial in late October.

When Selander took MasterCard public, partly to change the perception of collusion driving these lawsuits, the company raised nearly $2.5 billion at $39 a share ma , and its shares shot as high as $320 before falling below $160 in the current stock market swoon. In its new incarnation, MasterCard must now compete hard to win the business of the banks, which are combining by the day in a rapid, forced consolidation. And it’s playing with a disadvantage: its size. Visa’s market share of global credit- and debit-card transactions is 68% vs. MasterCard’s 28%, according to the industry newsletter The Nilson Report. Combined, those advantages give Visa not only a bigger wallet to fund new programs but also superior leverage with the banks.

So these days at MasterCard’s elegant corporate campus designed by architect I.M. Pei in the Westchester County hamlet of Purchase (so named well before MasterCard moved there), Selander is asking his team to embrace the life of an underdog and a public company, operating in credit-tight markets. In a nutshell, that means squeezing more out of the assets it has, which formerly were “used more for the benefit of our brand and company,” says Selander. “We have begun to realize, Hey, we can extend the use of those assets to our customers.”

CEO Selander, at headquarters in Purchase N.Y. wants a bigger share of customers wallets.David Yellen


One of its biggest is marketing muscle, primarily in the form of the “priceless” campaign. (“There are some things money can’t buy. For everything else there’s MasterCard.”) Since debuting in 1997, the ads have successfully conveyed a sense of the nonmaterial benefits of spending money, something that MasterCard feels distinguishes it from Visa and others. The philosophy is evident in the way it designs its credit-card rewards products, which it pitches to banks. The rewards focus on experiences, like free vacations, rather than just objects or privileges. Says Larry Flanagan, global chief marketing officer, the custodian of this one-word franchise: “You’ve got to avoid the pitfalls of a classic campaign like ‘priceless’ losing its value.”

With that in mind, MasterCard works overtime to woo bank customers with one-of-a-kind marketing angles. Its biggest reward experience—and the subject of the first-ever “priceless” spot—is Major League Baseball. Banks buy from MasterCard the right to put MLB teams on their cards or offer cardholders a trip to the World Series. MasterCard competes tenaciously with Visa for those sponsorships, such as for soccer’s World Cup. A lawsuit over who got to sponsor the event ended in 2007 with $90 million paid by the global soccer federation to MasterCard but the sponsorship going to Visa.

Chris McWilton, president of global accounts, and his team spend much of their time calling and visiting MasterCard’s four biggest customers—Citigroup c , J.P. Morgan Chase jpm , Bank of America, and HSBC—which make up nearly 30% of its revenues, to make sure they’re happy. Lately he’s had his hands full. When J.P. Morgan Chase, a majority-Visa debit customer, bought Washington Mutual, a majority-MasterCard debit customer, analysts suggested that Chase would eventually switch WaMu’s cards to Visa. “It will take a long time to play out,” says McWilton.

10.27.08 mastercard graph Fortune Chart

One thing McWilton has been urging MasterCard to do is come up with innovations that serve affluent customers, the creditworthy borrowers that banks tell him they are desperate to embrace after the debacles in subprime lending. That has led MasterCard to develop a new version of its World-brand card, called World Elite, and MasterCard Black—a not too subtle strike at American Express’s Centurion card—which both offer superior service and rich rewards packages for banks to purchase on behalf of their customers. A program called Easy Savings allows banks to put specific merchant discounts on their cards to steer customers toward bigger-ticket purchases.

MasterCard also likes affluent cardholders because they tend to travel and generate cross-border fees and currency-conversion fees—add-ons that irritate travelers but make up a quarter of MasterCard’s revenues and rank as the fastest-growing component. A California court decision in 2003 forced MasterCard and Visa to be clearer about such fees but didn’t require them to lower them.

While MasterCard would be unlikely to mention it in its marketing materials, one big service it’s providing to banks now is fighting against a potentially huge regulatory change taking shape in Congress. For decades merchants have complained about so-called interchange fees, estimated at an average of 1.6% of any sale, that they pay through their banks to credit-card-issuing banks. MasterCard and Visa, which collect the fee, don’t keep any of it for themselves, but do pass it on to the issuing banks. The fee, according to MasterCard, Visa, and their banks, compensates lenders for their risk and the cost of the rewards programs that encourage people to use their cards. But the political appeal of taking on the credit card industry is strong. Critics charge that the fees are too high and are passed on to consumers as a kind of inflation, though MasterCard’s legal team has commissioned studies to rebut the argument.

In a windowless basement room at MasterCard’s headquarters, another phase of the company’s new world is on display: contactless payment devices. Ranging from cards to key fobs to mobile phones, they can simply be waved—at a distance of no more than an inch and a half—in front of a terminal. You might already have this technology in your wallet: If your MasterCard-brand card has a symbol that looks like four parentheses on the back, it’s contactless. “Advanced payments,” as contactless devices are called, are still just a sliver of the electronic market. One reason is consumers’ lack of familiarity with them; another is concern about fraud. “Educating consumers and increasing their confidence in security are the two biggest hurdles issuers and merchants must overcome before contactless cards can reach the 100 million mark in circulation,” writes Tower Group analyst Dennis Moroney in a recent report. Still, MasterCard is energized over the potential of finding entirely new ways for people to use credit and debit in their daily lives. “Once you own the factory,” says Wendy Murdock, chief product officer, “you’ve got to find ways to pump more through it.” Retailer acceptance of contactless cards is relatively small—only 80,000 merchants take them, says a study by market research firm Financial Insight. But those that do are high profile, including chains like McDonald’s mcd and Rite Aid rad .

Contactless is best suited for speed-conscious transactions. So far, MasterCard’s PayPass brand has gotten out in front of Visa, with 37 million contactless cards in the market globally vs. roughly 10 million for Visa’s payWave cards. MasterCard has signed up Coca-Cola ko to offer PayPass at vending machines, which are slowly rolling out in the U.S. With bank customer Citi, MasterCard has been promoting a trial run on the New York City subway’s Lexington Avenue line. “These days our ideal customer takes the subway to the airport at J.F.K. and flies to Tokyo,” says McWilton. Someday advertisements might have a contactless spot that transfers a merchant discount to your card.

The average American has eight cards, while the average German has just two.

The potentially giant revolution in payment is with mobile phones. Phones can be used to make online purchases, or as contactless devices themselves, a technology MasterCard is trying out in Korea and Canada. “Mobile is a monster opportunity,” says Art Kranzley, the company’s head of advanced payments. Its biggest potential is to replace person-to-person cash swaps with phone-to-phone money transfers. MasterCard is developing standards for such transfers with the same group that created the GSM protocol used by most global cellphone users.

At the same time, however, competitors like Visa and First Data fdc , the giant transaction processor, are racing to develop similar technologies. First Data created a contactless phone with Sprint that works on the BART trains in the San Francisco Bay Area. Visa says it’s already ahead in mobile devices, thanks to its deal with T-Mobile’s new Google goog Android phone, which will have a mobile-payments program. “I don’t know if anyone will have a unique technology,” says David Robertson, publisher of The Nilson Report. “I think once someone finds a winner, everyone else will jump on.”

For MasterCard the central promise of its business is that huge untapped sea of transactions in the nonelectronic world. It doesn’t necessarily have to beat Visa or AmEx to make more money. It needs to beat cash, check—and frugality itself. MasterCard already takes in half its revenues outside the U.S., and the portion is sure to grow. There, the growth of the card market has a much longer way to go. The average American has eight cards, the average Briton five. In Germany and Japan it’s two. Developing countries are even more promising; MasterCard’s size disadvantage matters even less in such places—there are no banks to deal with, since much of the population doesn’t use a bank. “It’s in those markets where the leader in mobile, or other technology will get ahead,” says Eric Grower, an independent industry consultant. Credit card penetration is near zero in India and China. Just as cellphones bypassed landlines, it’s envisioned that such markets will also go straight to mobile banking and person-to-person payment, skipping cards altogether. There may be a word that sums up such a lucrative prospect for a company like MasterCard: priceless.

A version of this article appears in the October 27, 2008 issue of Fortune.