You could soon be paying significantly less for New York City yellow cabs. That is, if you opt to carpool.

Two tech transit firms, Curb and Via, announced a new effort to roll out carpooling to cabs. While shared rides have long been an option through startups Lyft and Uber, traditional cabs haven't had the infrastructure to offer it until now.

Carpooling rates will be discounted for passengers by as much as 40% of the metered fare, the companies said.

Via is known for its flat-fee shared ride service in New York, D.C. and Chicago that's like a hybrid of a bus and Uber. Via will lend its expertise to Curb, the cab-hailing and payment app bought by Verifone (PAY) in 2015. (Verifone owns the meters, card readers and taxi-TVs in roughly 60% of New York's cabs.)

Via's dynamic routing technology calculates where to direct both passengers and drivers to maximize efficiency for shared rides. Instead of picking up passengers exactly where they are, the system tells passengers to walk to to "virtual stops" -- nearby corners where it makes most sense for drivers to make the pickup based on traffic and other factors.

"It saves the driver from needing to make unnecessary detours to pick you up," Via CEO Daniel Ramot told CNNTech. The minimal additional effort on the passengers' part contributes to the overall efficacy of the system.

He says Via, which has raised more than $137 million to date, "will help taxi drivers earn better wages, reduce the cost of taking a cab and move more people. I think that's a good thing; if we don't do it, someone else will."

How it works

Riders will receive the discounted rate only if they are matched to a carpool. Via and Curb will each take a cut of the actual metered rate, and only if a carpool is matched. If the system can't match a rider with another passenger, the rider will pay the full metered rate.

The pooling option can be accessed through both the Curb and Via apps. Riders can book up to two seats, and no more than two separate parties will be joined in a carpool at once. For now, carpooling will be available only for rides taken between 32nd and 110th Streets in Manhattan but Ramot said the system is expected to scale quickly throughout the borough and beyond.

Related: Yellow cab drivers are using this app to compete with Uber

By introducing pooling, yellow cabs will be able to offer riders a more economic option. They haven't been able to compete in the pricing wars that new players like Uber and Lyft have waged, in which the startups can fall back on venture capital funding to offset cheap prices used to lure customers. Taxis also won't levy surge pricing during busy periods, as Uber and Lyft do.

According to Verifone global head of product and marketing Jason Gross, the collaboration came to be after the Taxi and Limousine Commission put out a call for innovative tech solutions to modernize taxi fleets. Shared rides have long been discussed, Gross said, but until now the system had been difficult to implement.

Pooling is just the latest partnership deal Verifone has struck recently to modernize cabs for the digital age. Last month, Verifone announced a collaboration with StreetSmart to help drivers predict the best routes for finding customers using troves of data and artificial intelligence.

For his part, Ramot said the partnership isn't at all political. "We're not trying to help any one segment in any kind of way," he said. "I'm pretty agnostic but I think it will be great to help [yellow cabs] make money."