
The "12 - Invalid Transaction" error is generally returned when the issuer declines the transaction. This typically happens when the same card is tried at the same merchant for the same amount at very frequent intervals. When this error occurs, the cardholder should contact their issuing bank.
What should a merchant do when it encounters this error code?
Retrying the same transaction over and over does not solve the problem; on the contrary, it increases the risk of the card being blocked. The merchant should first check the transaction details (amount, currency, installment count, transaction type). An explanation of the code can be obtained from the bank, since some banks generate code 12 for different underlying reasons.
The customer should be offered an alternative payment method, and the cardholder should be asked to contact their bank.
A recommendation for developers: translate response codes into a message the user can understand, and avoid automatically retrying the same transaction.