New York became the latest city to tell businesses they must accept cash.

The bill, which prevents most retailers from refusing to accept cash or charging customers more if they use it, was approved by the city council Thursday.

“No longer in New York City will brick-and-mortar businesses have the right to refuse cash and effectively discriminate against customers who lack access to credit and debit,'' Ritchie Torres, the bill's chief sponsor said in an emailed statement. "The marketplace of the future must accommodate the needs of vulnerable New Yorkers."

The law will go into effect nine months after it is signed by Mayor Bill de Blasio, who supports it.

New York joins Philadelphia, San Francisco and the state of New Jersey in passing legislation that lawmakers say will prevent businesses from enacting policies that shut out the millions of Americans who don't have a bank account, lack credit cards or don't have photo identification.

Cash-free is a growing trend

A growing number of restaurants and other retailers have stopped accepting cash in order to speed up transactions, reduce the risk of theft and accommodate the increased use of credit and debit cards, as well as digital wallets like Apple Pay and Google Pay, to buy services and products.

Honoring role models:Who inspires you? USA TODAY seeks your Women of the Century to commemorate 19th Amendment

Cannabis is causing complications:Weed? CBD? New products, new laws are causing confusion in the workplace

Fewer Americans are using dollars and cents for even the smallest purchases. While consumers used cash for 46% of purchases under $20 in 2015, they used hard currency to pay for just 37% of similarly priced items in 2019, according to the payment systems company Square.

But while a growing number of Americans have stopped using cash to pay for meals, groceries or a new outfit, there are many others who don't have a choice.

Nationally, 6.5% of households in 2017 did not have bank accounts, and 18.7% had accounts but also used financial services outside of insured institutions, according to the FDIC. In New York state, nearly a quarter of all households are "unbanked" or underbanked.

Communities of color are particularly hard-hit. Among African American households, 16.9% nationally didn't have bank accounts in 2017, the most recent year data was available, and 14% of Latino households did not have a bank account, according to the FDIC.

For that segment of the population, some lawmakers say, a business that doesn't take cash is basically off-limits.

Some change their minds about cash

Some companies that had gone cash-free have reversed course.

Sweetgreen, the salad restaurant chain that went cashless in 2017, planned to start accepting hard currency again at all of its locations by the end of 2019.

“Going cashless ... had the unintended consequence of excluding those who prefer to pay, or can only pay, with cash,'' the company said in a statement. "Ultimately, we have realized that while being cashless has advantages, today it is not the right solution to fulfill our mission.”

Meanwhile, Amazon, which was instrumental in launching the digital economy, has said its Amazon Go stores will all eventually accept cash and its locations in San Francisco and New York City already do.

New York's law comes on the heels of Philadelphia's ban, which took effect in October. New Jersey began requiring businesses to accept cash in March, and San Francisco passed a similar law in May. Massachusetts has prohibited cashless merchants for more than four decades.

Some New York business owners said having to take cash could be a hardship.

“Using cash just slows us down,’’ says Michael Ryan, owner of Flip Siqi, a taqueria in the West Village section of Manhattan.

The restaurant has been cashless since it opened four years ago, and Ryan says that he's been able to accommodate more customers since lines move quickly when they pay with the swipe of a card.

Cash on the premises invites thieves, says Ryan, who was robbed five times at restaurants he previously owned. And he estimates he’d have to add another 20 hours a week to his crew’s schedule to deal with counting dollars and going back and forth to the bank.

But eventually, he believes, the law might become moot.

"It will be phased out,'' he says, "because no one’s using cash anymore.''

Follow Charisse Jones on Twitter @charissejones