A ticket machine is a Muggle vending machine that produces tickets. For instance, ticket machines dispense train tickets at railway stations and tram tickets at some tram stops and in some trams. The typical transaction consists of a user using the display interface to select the type and quantity of tickets and then choosing a payment method of either cash, credit/debit card or smartcard. The ticket or tickets are printed and dispensed to the user.
To encourage usage of ticket machines and reduce the need for salespersons, machine prices may in some cases be lower than those at a ticket counter.
In many countries where trains and urban transport tickets operate largely on the honor system (with enforcement by roving inspectors or conductors), there are also machines in stations (or in vehicles) just for validating tickets. This is for the situation where one buys a ticket in advance and decides to use it later. Usually, the ticket is time-stamped to determine its validity period. A common problem is forgetting to validate and then being fined as if one had no ticket at all.
Ticket machines that are out of service or accept 'exact change only' result in losses for transport providers. Ticket machines on trams in Melbourne, for example, often run out of change when passengers use a higher ratio of $2 and 50c coins, depleting the ticket machine of smaller coin denominations (10c, 20c). Passengers do not need to buy tickets on trams when ticket machines run out of change.
Such machines are generally not used in the United States. Nearly all American mass transit networks operating on the honor system expect their users to buy tickets immediately before use; regular riders can avoid that inconvenience by buying period passes in advance (often from the same machines that sell daily or one-time tickets). Recently, however, a handful of regional rail systems like Caltrain, Metrolink, and Charlotte Area Transit System have adopted the use of validation machines for at least some ticket types. Ticket machines are often used in car parking, as well as those that issue free tickets — for example, those for virtual queueing.