A vending machine is a machine that dispenses items such as snacks, beverages, alcohol, cigarettes, lottery tickets to customers automatically, after the customer inserts currency or credit into the machine. The first modern vending machines were developed in England in the early 20th century and dispensed postcards.