BROOKLYN - Thousands of subway riders were overcharged this week due to a MetroCard vending machine malfunction.

New York City Transit says an encryption device in the machines malfunctioned. The device is supposed to process electronic data when people swipe a debit or credit card. Then, it sends the information to be authorized and charges the card. The malfunction caused an error message to appear on the machine when people swiped their cards to pay ? but the cards were still charged.

New York City Transit says solving the problem won?t be an issue. Now that the problem has been identified, they say it will be fixed as soon as possible. They?ve asked the contractor to install a signal that would alert people when the encryption device has an error.

Days after the error, riders continued to use debit and credit cards to purchase their MetroCards. They say they?re confident the system won?t fail them again.

The device that broke was one of two that is used for the system. Each one serves more than 2,000 machines citywide.

According to the MTA, credit and debit cards are used in about 30 percent of MetroCard transactions. Anyone who received an incorrect charge on their card will be automatically reimbursed in seven to 10 business days.