There is an audacious economic phenomenon happening in China.

It has nothing to do with debt, infrastructure spending or the other major economic topics du jour. It has to do with cash — specifically, how China is systematically and rapidly doing away with paper money and coins.

Almost everyone in major Chinese cities is using a smartphone to pay for just about everything. At restaurants, a waiter will ask if you want to use WeChat or Alipay — the two smartphone payment options — before bringing up cash as a third, remote possibility.

More from New York Times:

The lawyer, the addict

In social sports, it's about camaraderie, not competition

Wealth advisers set up shop with a shared back office

Just as startling is how quickly the transition has happened. Only three years ago there would be no question at all, because everyone was still using cash.

"From a tech standpoint, this is probably one of the single most important innovations that has happened first in China, and at the moment it's only in China," said Richard Lim, managing director of venture capital firm GSR Ventures.

There are certain parts of the Chinese internet that have to be seen to be believed. Coming from outside the country, it's hard to comprehend that Facebook or Google can be completely blocked until you are forced to do without them. It's tough to fathom how critical the messenger app WeChat is for everyday life until the sixth person of the day asks to scan your QR code — a sort of bar code — to connect the two of you.

What's happening with cash in China is similar. For the past three years, I have been outside mainland China covering Asian technology from Hong Kong, which has a very different internet culture from the mainland. I knew that smartphone payments were taking over in China, as the statistics were stark: In 2016, China's mobile payments hit $5.5 trillion, roughly 50 times the size of America's $112 billion market, according to consulting firm iResearch.

Even so, the attendant cultural shift was graspable only in person. I recently moved to Shanghai and felt the change with cash acutely because my first few weeks in the metropolis of more than 20 million were spent cut out of the system. Because of an issue with my bank, I couldn't immediately link my account to WeChat, which has become a virtual wallet for so many.

That meant I had to navigate China the way I would have three years ago: with a stack of red 100-renminbi notes.

At coffee shops and restaurants, I held up lines as I fumbled out my wallet and peeled off the bills to give the cashier. If I was hungry I had to go outside and find a restaurant, while bowls of noodles, groceries and coffee materialized at our office, ordered by my colleagues and paid for on the phone. If I had to get somewhere, I couldn't use my phone to unlock one of the ubiquitous bicycles that are a part of China's bike-sharing craze.

Even the buskers were apparently ahead of me. Enterprising musicians playing on the streets of a number of Chinese cities have put up boards with QR codes so that passers-by can simply transfer them tips directly.

"It has become the default way of life now," said Shiv Putcha, an analyst with the research firm IDC. "Literally every business and brand in China is plugged into this ecosystem."

Some Scandinavian countries have also weaned themselves from cash but still use cards frequently. In China, the change has been to phones. One friend didn't realize how reliant she had become on mobile payments until her bank called her. She had left her A.T.M. card in the machine three weeks earlier and had not noticed its absence.

In practical terms, this means Tencent and Alibaba's financial affiliate, Ant Financial, the two Chinese internet companies that run WeChat and Alipay, respectively, are sitting atop a gold mine of staggering proportions. Both companies can make money off the transactions, charge other companies to use their payment platforms and all the while collect the payments data to be used in everything from new credit systems to advertising.

Mr. Lim said that according to recent data, Ant Financial and Tencent were set to surpass credit card companies like Visa and Mastercard in total global transactions per day in the coming year. The key is that both companies are able to provide payments on the cheap, partly by allowing smaller vendors to make use of a simple printout of a QR code or their phone, instead of an expensive card reader. A back-end system that stores a record of user accounts, instead of having to communicate with a bank, also keeps costs down.

While Tencent does not break out what it makes from mobile payments, in the fourth quarter of 2016 the "other services" item in its earnings almost tripled from a year earlier to 6.4 billion renminbi, or $940 million, driven largely by mobile payments.

There are some potential future problems with China's sweeping embrace of online payments. As the country builds its entire consumer economy around two private smartphone payment platforms, it is slowly locking out people unable to get onto those networks, and locking itself into those companies.

At the simplest level, that makes life difficult for tourists and business travelers who are unlikely to open a bank account in China and so will find it hard to turn their phones into wallets.

More broadly, it means things could get harder for foreign and local businesses alike. Foreign companies hoping to sell to Chinese consumers now must deal with Alibaba and Tencent or risk being unable to take payments. Likewise, Chinese companies reliant on Alibaba and Tencent have to build out separate structures to deal with the world of Facebook, Google and credit cards that still dominate elsewhere.

There is a corollary for what could happen here. In Japan in the early 2000s, flip phones could do everything from stream cable TV to pay at stores. But because the phones were so advanced, Japan was slow to adopt smartphones, and it went from tech giant to tech laggard in 15 years.

Now in Japan those flip phones, which are still being used, are called Galápagos phones because they evolved perfectly for an isolated environment.

No doubt aware of this, Alibaba and Tencent are pushing to expand beyond China to ensure their newest innovation doesn't go the way of the dinosaurs. Still, competition is most likely looming.

"The million-dollar question is: Will Western firms decide to build a system and compete?" Mr. Lim said. "The answer is probably yes."

Until then, new arrivals like me have to deal with being locked out of China's online payments infrastructure.

Earlier this month, though, I lucked out using cash. As I was trying to get a pile of stuff from Ikea back to my new apartment, a cabdriver looked skeptically at the huge rolled-up mattress pad I was planning to load into the back of his car.

"I'm not sure I can take you," he said to me. "I can only take cash."

"That's all I have," I said to my fellow Luddite, who grumpily agreed to ferry me home.