Passengers on MBTA commuter boats serving Quincy, Hull, and Hingham will soon be able to use their smartphones to buy tickets, leaving behind the days of scrounging for cash or standing in line at ticketing machines.

The Massachusetts Bay Transportation Authority says mobile ticketing, announced for commuter rail customers last spring, will be expanded to commuter boats as early as this fall.

The mobile application enables customers to use their credit or debit cards to put money on the mobile ticket, which is then accessible by phone. Once purchased, the app displays a scannable QR code for a short period of time, long enough to be scanned by a conductor with a hand-held device but short enough to be accessible for only one trip.

Advertisement - Continue Reading Below

A pilot program will begin with commuter trains. The T plans to roll out the platform to South Shore rail passengers, starting with only about 300 customers in September.

“Before we do the roll out to every line, we will test it on a small set of lines, the Greenbush and Old Colony Line,” said Joshua K. Robin, director of innovation for the MBTA.

“Our feeling on it is rather than investing in machines that would take years, we’re able to put a vending machine in someone’s pocket,” he said.