Metra will remove the last cash-only ticket vending machines on the Electric Line due to a decline in sales by the end of the month.

The remaining cash-only vending machines will be taken out of service at 15 stations on the Metra Electric Line by May 1, Metra said.

Between 2012 and 2016, sales at the vending machines declined from nearly 40 percent of overall ticket sales to just over 14 percent, Metra said.

The agency has found customers prefer to purchase tickets using the Ventra mobile application and credit cards, Metra said.