Mobile payment technology has already become popular in the world of retail, like at this Whole Foods store in Cupertino, Calif. Metro is seeking to introduce a similar cellphone fare payment system in 2019. (AP Photo/Eric Risberg)

Metro plans to allow customers to pay their train and bus fares with their mobile phones by the end of 2019, the transit agency announced Tuesday.

The agency is upgrading its fare boxes, fare gates and fare vending machines — adding new hardware that will allow customers to use the same tap-and-go technology with their phones that they use with SmarTrip cards.

The upgrades will be finished sometime next year, Metro said, though it’s unclear how many riders will immediately have access to the system. Each mobile payment platform (such as Apple Pay or Google Pay) must separately work with Metro to ensure that their technology meets the transit agency’s standards for speedy transactions before users of that platform can start using the mobile payment system.

Those hardware upgrades will cost $10 million, though Metro officials say they hope the new technology will help save money in the long run.

“By accepting mobile payments, we can reduce the number of vending machines in stations, which will save several millions of dollars annually and more than offset the cost of mobile implementation,” spokesman Dan Stessel said.

Even after the mobile fare system is launched, passengers will continue to be able to use their SmarTrip cards to pay for their trips.

Tuesday’s announcement came several years after the transit agency first posed the idea of allowing customers to pay fares with their phones.

Metro launched a limited 90-day mobile fare payment pilot in 2015. At the time, the agency said it was pleased with the results and planned to expand mobile payments to the rest of the system, but still needed to fix some kinks. Board members then were worried that mobile payment technology was so new that few riders would be comfortable enough to use it on a daily basis.

Now, the technology that enables tap-and-go mobile payments is increasingly ubiquitous in other areas of commerce.

“Mobile fare payment is the future of transit, giving customers the ability simply to tap their phone and go, all without stopping at a fare vending machine or using a separate card,” Metro General Manager Paul J. Wiedefeld said in a statement. “Not only will this be a better, easier experience, but will cost less to operate.”

Metro also is developing an app that will allow riders to more easily monitor their SmarTrip account, add to the existing balance, and get more information about fares and real-time service information.

Other transit agencies around the country and the world have introduced mobile fare payment systems. Transport for London launched mobile payments for the city’s bus and train network in July 2015. Six months later, an average of 35,000 people a day were using their phones to pay their fares, according to the Guardian.

Longterm, Metro is planning to upgrade its fare gates and vending machines to encourage more people to use their phones for payment, The upgraded machines are supposed to be more aesthetically pleasing. The vending machines, in particular, are intended to be “more user friendly with large touchscreens, better accessibility for customers with disabilities, have multi-language support, and a smaller physical footprint,” the agency said.

Metro expects to introduce the new fare gates and vending machines at all of the system’s 91 stations by the end of 2020.

It’s unclear how much that whole revamp will cost — Metro said that will ultimately be dependent on the procurement process — but previous estimates from several years ago have put the cost as high as $294 million.

“The current fare gates are more than 25 years old, using original power and communications systems,” Metro said in its statement. “The new fare gate design will be selected based on a number of factors, including customer input, speed, reliability, and ability to prevent fare evasion. In addition, new fare boxes will be installed on buses to replace the existing 15-year old equipment.”