MTA commuter rail riders will soon be able buy tickets from their smartphone instead of a ticket machine.

The Metro-North and Long Island Rail Road committees approved a $2 million contract to U.K.-based transit company, Masabi, to bring its mobile ticket-buying technology to Metro-North and Long Island Rail Road.

"The purpose of this is to put the vending machine in the customer's pocket so never again would you have to wait in line for a vending machine," said Josh Robin, vice president of Masabi. "I was a Metro-North rider my whole life, so I'm excited to use this myself."

Masabi will update the app over the six-year contract. It is not yet known when the app will become available, though it could be months away, a Metro-North spokesman said.

Conductors would be able to view the ticket on the riders' smartphone or tablet, or scan tickets that feature a QR code.

The company's app is already available for commuter rails in Boston and San Diego.