Interactive walkthrough

A contactless card payment, step by step

Follow one Visa contactless purchase from the amount typed at the till to the money reaching the merchant. The card (or phone) is in the reader's field for a fraction of a second: in that time it receives the reader's data, decides, and returns its cryptogram in a single command. Everything after "card read OK" happens without it. Every command, key, signature and message is computed in your browser with the same code as the tools on this site. Change a value or pick a scenario, and compare it with a standard approval: the same amount, tapped with a card, with no cardholder verification. For the same sale with the card inserted, see the contact walkthrough.

Calculations run in your browser; this page does not send the values you enter. Test keys only.

What this walkthrough models

Kernel
Visa contactless, EMV Contactless Kernel 3 (qVSDC), online authorisation only. Mastercard (Kernel 2) and the other kernels use other commands, data and verification rules
Card or phone
A contactless Visa card at an attended reader that can go online
Reader limits
Illustrative: a CVM limit after the R$ 200 no-PIN limit Abecs announced in December 2020 (plus one cent, TADG §2.13.3 note 20), a floor limit of zero (online-only), no transaction limit (Visa Rules)
Card authentication
The ARQC, checked online by the issuer; fDDA (fast DDA) checked by the reader with demo RSA keys, a result that stays in the reader
Cardholder verification
From the TTQ and the CTQ: none below the CVM limit; above it, online PIN for a card, the phone's own verification for a phone
Cryptogram version
Visa CVN 18 (Option B card key, EMV common session key), checked against pyemv. Visa contactless cards also use CVN 17 and CVN 22; no public CVN 17 example exists to check against
After the tap
No second GENERATE AC and no issuer authentication: the card has left. Issuer update processing (a second tap) is not modelled
Issuer
Illustrative policies: fraud rules and scores, the counter rule, BIN routing and fee rates
illustrative: R$ 200 without a PIN, plus one cent
Try a scenario
All values: keys, card, issuer records, fees
The sale and the reader
grocery stores, supermarkets
empty = none, as the Visa Rules require
0.00 on an online-only reader
The card
12 to 19 digits
set when the card was issued; 4 digits
used when the card asks for online PIN
Keys (test keys only)
empty = derived from the IMK, as the issuer did
The issuer's records
Fees
Card or phonePRESENT CARDReaderAcquirerCard networkIssuer processorIssuer bankpre-processing
1 The reader checks the amount against its limitspre-processing
1

The reader checks the amount against its limits

Reader

The cashier types BRL 25.50. Before it switches on its antenna, the reader compares the amount with three limits it was loaded with (Entry Point pre-processing, EMV Contactless Book B). At or above the contactless transaction limit, contactless is not allowed at all. Above the contactless floor limit, the card must produce an online cryptogram: this reader is online-only, so its floor limit is zero. At or above the CVM required limit, the cardholder must be verified. The results go into the Terminal Transaction Qualifiers (TTQ, 9F66), which the card will receive with the amount. The limits here are illustrative: the CVM limit follows the R$ 200 limit for purchases without a PIN that Abecs, the Brazilian card industry association, announced in December 2020; a Visa reader asks for a CVM from the limit itself, so it is set one cent above (Visa TADG §2.13.3, note 20).

9F02 Amount, authorised
000000002550BRL 25.50 in minor units
Reader contactless transaction limit
none (disabled)the Visa Rules require it to be disabled or at its maximum
Reader contactless floor limit
BRL 0.00BRL 25.50 > floor limit: online cryptogram required
Reader CVM required limit
BRL 200.01BRL 25.50 < CVM limit: no CVM needed
9F66 TTQ
37 80 40 00online cryptogram required
2

The card is tapped: field on, one card found

Reader ⇄ Card

The reader switches on its 13.56 MHz field and polls for cards of ISO/IEC 14443 type A and type B. The card draws its power from the field and answers. If two cards answered at once, anti-collision would separate them; EMV readers then stop with "one card only" rather than choose (EMV Contactless Book D). The reader activates the card for ISO/IEC 14443-4, the block protocol that carries the same APDUs a contact card receives. The remaining exchanges must finish while the card stays in the field, typically within a few hundred milliseconds.

Polling
type A and type B, in turnEMV Contactless Book D
Cards found
1
SAK
20type A: ISO/IEC 14443-4 supported
3

SELECT PPSE: the available payment applications

Reader ⇄ Card

The reader selects the Proximity Payment System Environment, 2PAY.SYS.DDF01 (a contact card offers 1PAY.SYS.DDF01 instead). Its answer lists the payment applications in one response, with no READ RECORD: here one entry, the Visa AID, its label, its priority and the kernel identifier 03, Kernel 3. The reader matches the entries with its own list of AIDs and kernels and builds its candidate list.

4F AID
A0000000031010Visa credit/debit
9F2A Kernel identifier
03Kernel 3: Visa
87 Priority
01
4

Final selection: the Visa application and its PDOL

Reader ⇄ Card

The reader selects the Visa application by its AID and hands the transaction to Kernel 3. The application's answer carries the Processing Options Data Object List (PDOL, 9F38): the reader data the card wants with GET PROCESSING OPTIONS. A Visa contactless card asks for the TTQ, the amounts, the country, the TVR, the currency, the date, the transaction type and the unpredictable number: everything it needs to decide and compute its cryptogram in one command.

Selected AID
A0000000031010VISA CREDIT
9F38 PDOL
9F 66 04 9F 02 06 9F 03 06 9F 1A 02 95 05 5F 2A 02 9A 03 9C 01 9F 37 04
5

GET PROCESSING OPTIONS: the reader sends its data

Reader ⇄ Card

The reader fills the PDOL with its values and sends them in GET PROCESSING OPTIONS, inside tag 83. On a contact card this command only starts the transaction. For a Visa contactless card it is the whole transaction: the card decides, computes the cryptogram and answers in this one exchange. The TVR is still all zeros: the reader has checked nothing on the card yet.

9F66 TTQ
37 80 40 00
9F02 Amount
000000002550
9F37 UN
5A3C91E7
6

The card decides, and answers with its cryptogram

Card → Reader

The card adds one to its counter (ATC 0026 → 0027) and reads the TTQ: the reader wants an online cryptogram, so it returns an ARQC. The TTQ does not ask for a CVM, so the card asks for none: its CTQ is all zeros. It derives the session key from its card key and the ATC and computes the ARQC over the reader's data and its own (Visa CVN 18, the same derivation as on the contact page). The reader also offers offline data authentication for online authorisations (TTQ byte 1 bit 1), so the card signs, with its RSA private key, its counter, the reader's unpredictable number, the amount, the currency and a number of its own: this is fDDA, fast DDA, a signature made inside GET PROCESSING OPTIONS rather than with a later INTERNAL AUTHENTICATE. Everything returns in one response, in format 2 (tag 77).

9F27 Cryptogram information
80ARQC: go online
9F36 ATC
0027was 0026
9F26 Application cryptogram
17C64A7D647BA27F
9F6C CTQ
00 00no CVM requested
9F10 Issuer application data
06 01 12 03 A0 00 00DKI 01 · CVN 18 · CVR 03A00000
9F4B Signed dynamic application data
96 bytesthe fDDA signature
7

READ RECORD: the records the AFL names

Card → Reader

The AFL in the GPO response names three records. The reader reads them while the card is still in the field: the static data the issuer signed (PAN, expiry, effective date, issuer country) and the two certificates the reader needs to check the fDDA signature. The cryptogram is already in hand; these records only serve offline data authentication.

94 AFL
10 01 01 01 18 01 02 00SFI 2 record 1 (signed); SFI 3 records 1–2
5A PAN
4761739001010010
5F24 Expiry
281231
8

Card read OK: the tap is over

Reader

The reader has everything it needs, beeps, and shows "card read OK": the card can go. From here on the card takes no part in the sale. Everything that follows (the fDDA check, the PIN if one is needed, the online authorisation, the issuer's answer) happens without it. That is the main difference from the contact page: no second GENERATE AC, no EXTERNAL AUTHENTICATE, no issuer script, and the ARQC is the only cryptogram this sale will have.

Message
CARD READ OKwith a beep; then "remove card"
Exchanges with the card
SELECT ×2, GPO, READ RECORD ×3
Cryptograms
1: ARQC 17C64A7D647BA27Fno second GENERATE AC
9

fDDA: the reader checks the signature, offline

Reader

With the card gone, the reader checks the fDDA signature with the same RSA chain as on the contact page: the CA key opens the issuer certificate, the issuer key opens the card certificate (and with it the hash of the static data in SFI 2), and the card key opens the signature. The reader recomputes the hash over the signed data, its own unpredictable number, the amount, the currency and the 9F69 the card sent: a signature recorded from another tap, or for another amount, does not match. The result stays in the reader: on an online transaction, fDDA results are not sent to the issuer in the TVR and are not covered by the cryptogram (Visa TADG §5.2.5). The keys are made-up demo keys.

CA key
A000000003 index 99demo key, 1024 bits
Issuer certificate
recovered, hash matches
Card certificate
recovered, hash matches
fDDA signature
validICC dynamic number 0027 (the ATC 0027)
10

Cardholder verification: none needed

Reader

BRL 25.50 is below the CVM limit of BRL 200.01, so the TTQ did not ask for a CVM and the card did not request one: no PIN, no signature. This is the quick tap most people know. Above the limit the card would ask for online PIN, or a phone would report its own verification.

9F66 TTQ byte 2 bit 7
no CVM required
9F6C CTQ
00 00no CVM requested
Kernel 3 outcome: CVM
No CVM
11

The reader sends an authorisation request

Reader → Acquirer

The reader packs the sale into an ISO 8583 0100. The POS entry mode, 071, says "contactless chip" (07, Visa TADG §2.13) with a terminal that can take a PIN. Field 55 carries the cryptogram and the data it covers, as BER-TLV, plus the TTQ and the CTQ, so the issuer can see how the cardholder was verified. There is no field 52: no PIN was typed. The values come from the GPO response and from the reader; the TVR is the all-zero one the card saw.

MTI
0100authorisation request
DE 22 POS entry mode
071contactless chip; PIN can be entered
DE 52 PIN block
absentno CVM
DE 55 Chip data
109 bytesARQC, IAD, ATC, UN, TVR, TTQ, CTQ…
12

Acquirer: merchant checks and routing

Acquirer → Card network

The acquirer checks that the terminal and merchant are known and allowed to take contactless sales, adds its institution ID and the transmission time, and finds the network from the card number: Visa.

Merchant / terminal
IDNTEQDEMO00001 / TERM0042known, contactless enabled
Luhn check digit
valid
Network from BIN
Visa
13

Card network: routing by BIN

Card network → Issuer processor

The network finds the issuer from the BIN (476173) and passes the request to the issuer's processor. It adds its own risk score. Nothing in the routing is specific to contactless: the entry mode and field 55 tell the issuer what kind of sale it is.

BIN
476173Visa
Issuer / processor
Banco Demo S.A. / Demo Issuer Processing
Network risk score
5illustrative, 0–99
14

Issuer processor: the cryptographic checks

Issuer processor + HSM

The issuer's HSM derives the card key from its master key, the session key from the ATC, and recomputes the ARQC: a match proves the card holds the issuer's key and saw exactly this amount, date and unpredictable number. For a contactless sale this check carries more weight than on the contact page: it is the only proof from the card that reaches the issuer, since the fDDA result stays in the reader. It also checks the iCVV in the Track 2 data and that the counter moved forward (this page's issuer rule).

ARQC
match17C64A7D647BA27F
iCVV
match
PIN
none sentno CVM
ATC
moves forward0027 after 0026
15

Issuer bank: the account

Issuer processor ⇄ Issuer bank

The processor asks the bank's core system for the card status and validity and the available balance. An approval places a hold for the amount.

Card status
active
Expiry
valid
Available balance
BRL 1,200.00enough for BRL 25.50
16

Fraud rules and the decision

Issuer bank → Issuer processor

A rules engine scores the sale and the first check that fails sets the response code. These rules and weights are illustrative; every issuer tunes its own. Issuers often treat contactless sales without a CVM with their own counters (how many taps, or how much, since the last PIN); that is not modelled.

DE 39 Response code
00 · Approved
Reason
every check passed
Fraud score
1 / 100
DE 38 Authorisation code
339696
17

The answer travels back to the reader

Issuer processor → Network → Acquirer → Reader

The issuer answers with an 0110: response code 00 and authorisation code 339696. Like every CVN 18 response, it carries issuer authentication data in field 55 (tag 91: an ARPC over the ARQC with a Card Status Update, ARPC method 2). On the contact page the chip checks it inside the second GENERATE AC. Here the card left at "card read OK", so the reader has no card to give it to: tag 91 is logged and goes no further. The response travels back the way the request came, matched by the STAN and the retrieval reference number.

DE 39 Response code
00Approved
DE 38 Authorisation code
339696
DE 55 tag 91
F25096BE00800000ARPC ‖ CSU: not delivered, the card is gone
18

Approved: no second cryptogram

Reader

The reader shows "approved" and the merchant can print a slip (contactless slips are often optional). The sale is finished without asking the card anything more: no second GENERATE AC, so there is no TC; the ARQC from the tap is the cryptogram that goes into clearing. The card never learns that the issuer approved.

Result
Approved, auth code 339696
Cardholder verification
No CVM
Final cryptogram
ARQC 17C64A7D647BA27Fno TC: the card is not asked again
19

Clearing: with the ARQC

Reader → Acquirer → Network → Issuer

At the end of the day the acquirer sends the sale to the network as a clearing record with the amount, the authorisation code and the chip data. For an online-approved tap the cryptogram in the record is the ARQC with the issuer's response code (TADG §6.2 describes the same for deferred authorisations); the issuer matches the record to its authorisation and posts it.

Amount
BRL 25.50
Authorisation code
339696
Cryptogram
ARQC 17C64A7D647BA27Fnot a TC
Issuer
hold → posted
20

Settlement: the money and the fees

Issuer → Network → Acquirer → Merchant

The network nets the positions and moves the money, usually a day or more later. The issuer pays the amount less interchange; the network charges scheme fees; the acquirer pays the merchant the amount less the merchant discount. The rates are illustrative; each fee is rounded to the nearest minor unit, halves up.

Cardholder pays
BRL 25.50
Issuer keeps (interchange)
BRL 0.281.10%
Network (scheme fees)
BRL 0.030.10%
Acquirer keeps
BRL 0.20
Merchant receives
BRL 24.99amount less 2.00%

What this walkthrough simplifies

The tools behind it

Each calculation on this page is one of the site's tools. Open them to work with your own data:

For training for your team, with your own cards and logs, see EMV for Developers or get in touch.

Terms are explained in the EMV and payments glossary.