The MTA is ready to roll out a new payment system to completely replace the Metrocard by 2023 — and riders will be able to start using the system by early 2019, according to details obtained by The Post.

Within 18 months, a contactless system will allow riders to wave their credit card or phone near a scanner to pay the fare at 500 turnstiles and on 600 buses, the source said. Riders will be able to use the methods in all entryways to the system by 2020, they said.

After that, the MTA will release its own “tap card,” so that riders can then choose between using that and their own credit card or phone.

The agency will also create an integrated system so that riders who use both New York City Transit and the Long Island Rail Road or Metro-North can buy the fares for both at the same time.

The MTA will keep the Metrocard system up and running during each phase in case of a breakdown, said the source. The agency used the same tactic with the token when it phased that out. It started testing Metrocards in 1993, but didn’t get rid of tokens until 2003.

MTA officials hope to completely get rid of the Metrocard by 2023, said the source.

The New York City-based company Cubic Corp. will be in charge of building the new system, and the whole project will cost more than $570 million in capital funds, said the source.

The new system will be similar to how London, Chicago, and Toronto deal with fare payment, said sources.

The replacement to the Metrocard is long overdue, said Andrew Albert, an MTA board member who heads the New York City Transit Riders Council.

“The Metrocard should have been replaced many years ago,” said Albert. “It’s very limiting in what the MTA can do in terms of transactions between subway and buses and Long Island Rail Road or Metro-North. The new fare payment system will make it so it’s easy and there will be options.”

Some critics had voiced concerns that a new system would require riders to have a charged and ready smartphone or credit card, but MTA’s plan allows options for those who don’t have either.

The new system will also allow the MTA to pilot all-door boarding on its Select Bus Service routes. Instead of buying a ticket on the sidewalk, riders will be able to tap their card or phone at any door.

MTA officials declined to comment, but the board is expected to vote on the project next week.