It's important to first distinguish between magnetic-stripe and fallback transactions. A magnetic-stripe transaction skips the chip entirely, which lowers its security level compared to a fallback transaction.
There are standards that keep payment systems running smoothly and reliably. One of these is ISO 20022. So what is ISO 20022, and why was it created? It is an international, XML-based financial messaging standard developed in 2009.
ISO/TC 68 is a technical committee within the International Organization for Standardization in Geneva, responsible for developing and maintaining international standards for banking, securities and other financial services.
The System Trace Audit Number (STAN) is a number assigned by the third-party system (ATM or POS) to help uniquely identify a transaction. It is generated in the range 000001 to 999999. Each new authorization message needs a new STAN; retries reuse the original STAN.