Tools

EMV Contact Transaction, Step by Step

One complete contact chip purchase with cashback, one exchange at a time: what the terminal sends, what the card answers, and what changes in the terminal's TVR, TSI and data. Change the scenario to replay the same transaction with another CVM, a wrong PIN, a CDA failure or an issuer decline.

Scenario

All data is invented test data: a test card number, random cryptograms, and certificates and signatures that are random bytes of the right length. They will not verify.

What changed

    Terminal Verification Results (95)

      Transaction Status Information (9B)

        CVM Results (9F34)

        Data the terminal holds

        About this walkthrough

        The card and the terminal

        A Mastercard-style contact card supporting CDA and offline plaintext PIN, with issuer authentication done inside the second GENERATE AC (AIP byte 1 bit 3 is 0, so there is no EXTERNAL AUTHENTICATE). An attended Canadian terminal with a zero floor limit, so every purchase goes online.

        Order of the functions

        Book 3 lets the terminal run processing restrictions, cardholder verification and terminal risk management in any order between reading the records and terminal action analysis. This walkthrough uses the common order. Offline data authentication with CDA ends only after GENERATE AC, when the signature is checked.

        Related tools

        Paste any response into the TLV Parser, the CDOL1 into the DOL Builder, the CVM List into the CVM Analyzer, and the TVR into the TVR and TSI Decoder.

        Sources

        EMV v4.4 Book 1 (application selection), Book 2 (CDA), Book 3 sections 6 and 10 (commands and transaction flow) and Book 4 sections 6.3 and A5 (terminal behaviour, Issuer Script Results).