The solution enabled users to load their Opal cards on their smartphones, using their Apple Wallets on an iPhone or an Apple Watch, or Samsung Pay on Android devices from the South Korean firm.
A statement from Mastercard said Google Pay would soon be added as a means of digitising the Opal card. In all three cases, funds can be added by linking an existing credit card.
Users can then tap their phones to pay as many customers do in supermarkets these days. Last year, Victoria introduced the user of its travel card, myki, on smartphones, but limited it to Android devices and people with either a VISA or Mastercard credit card.
"People want to get from place-to-place, and they want to do it fast," a Transport for New South Wales spokesperson said. "If you're a user of public transportation in New South Wales our collective partnership now allows you to tap-and-go on the transit system right away using a digital pre-paid card.
"The Opal digital card delivers a fast, easy and secure payments experience to get you faster to where you need to go."
Sue Kelsey, executive vice-president of Consumer Solutions at Mastercard, said: "Mastercard is thrilled to work with Transport for NSW with the support of its partners at Commonwealth Bank and EML Payments to help them deliver increased choice, flexibility and confidence in transit experiences for their customers.
"Consumer needs have evolved rapidly over recent months and it's important that all parties work together to leverage payment innovations like Mastercard's solution to deliver safe and convenient experiences.
"Using Mastercard's new pre-paid technology platform and managed services capabilities, Mastercard's customers can easily design, develop and deploy customised digital payment experiences their customers expect and deserve today."
Andrew Hinchliff, group executive for Institutional Banking and Markets at Commonwealth Bank, said: "CBA is delighted to be part of the transport payment solution that offers a digital solution to commuters.
"We look forward to Sydney commuters enjoying an alternative option in how they choose to pay for their travel, and hope they enjoy the speed, convenience and security that it offers."
Andrew Betts, group chief risk Officer at EML Payments, said: "EML is delighted to partner with Transport for New South Wales, Mastercard and Commonwealth Bank to deliver a truly digital payments experience that revolutionises the way commuters think about and pay for travel.
"The move away from a plastic card solution to a tokenised offering provides greater security for commuters and, from a corporate responsibility standpoint, is environmentally friendly."
Depending on how the trial goes, Mastercard and Transport NSW plan to go live with the solution before the year ends.