Part 1 of Behind the Tap, a series on how contactless payments work.

You tap your card on a POS terminal at a supermarket. It beeps, four little lights go green, and you put the card back in your wallet.

Most people hear that beep as "payment approved". It isn't. When the terminal beeps, the bank usually hasn't been asked anything yet. The beep means something smaller and more practical: the terminal has everything it needs from your card, so you can take it away.

The EMV contactless specifications are clear about this. The "card read successfully" signal doesn't mean the transaction is complete. The normal authorisation still has to happen before anyone knows the result.

This first part is about that half second: how long the card gets, where the time goes, what the lights and tones mean, and what the bank loses because the card has already gone.

Who's involved

EMV calls everything on the shop's side the POS System, and it comes in three shapes. It can be one integrated device. It can be an "intelligent" reader that does most of the contactless work and passes the result to the terminal. Or it can be a "transparent" reader that only talks to the card, with all the processing done in the terminal behind it. The last two are how contactless gets added to contact terminals that are already on the counter.

Whatever the shape, two layers of software do the work:

  • Entry Point finds the card, reads its list of payment applications (the PPSE), and picks one that both the card and the terminal support.
  • A kernel then runs the transaction for that application. Each scheme has its own: Kernel 2 for Mastercard, Kernel 3 for Visa, Kernel 4 for American Express, and so on.

The kernel finishes by handing back an Outcome, its instruction for what happens next. There are eight: Select Next, Try Again, Approved, Declined, Online Request, Request Online PIN, Try Another Interface and End Application. Most of this series happens inside those two layers. This part is about the clock they both run against.

500 milliseconds

Contactless has one main performance target: the card should be in the reader's field for no more than 500 ms.

The clock starts when the card is discovered, at the first ISO 14443-3 command it answers. It stops when the reader starts telling you the card has been read: the first light coming on, or the first few cycles of the beep.

The 500 ms is split between the two sides:

  • The reader gets at most 100 ms. That covers sending its commands and its own processing, including the time between the card's last response and the signal that you can take the card away.
  • The card gets the other 400 ms, for its processing and for sending its responses.

The card gets four times as much because it does the expensive work. It computes an application cryptogram with its secret key, and most cards also produce an RSA signature the terminal can check offline. A chip on a plastic card, powered only by the reader's field, is slow at that kind of maths.

A contactless tap on a timeline: a few short radio exchanges, a long stretch while the chip computes its cryptogram and signature, the last reads, then the beep before the 500 ms limit. After the card has gone the terminal asks the bank, and the bank's data for the chip (tags 91, 71, 72) has nowhere to go

Where the time goes

I wanted to know how much of that budget goes on just moving bytes, so I worked it out from the radio protocol.

Contactless payment cards talk at fc/128 in both directions, where fc is the 13.56 MHz carrier. That's one bit every 9.44 microseconds, about 106 kbit/s. A Type A card sends each byte as 8 data bits plus a parity bit. A Type B card sends a start bit, 8 data bits and a stop bit. Every command and response also travels in a block with a one-byte header and a two-byte CRC.

So a byte costs about 85 µs on a Type A card and 94 µs on a Type B card. Here's what that means for a typical tap. The APDU sizes are rounded figures, not taken from a real card:

Python
CARRIER_HZ = 13_560_000
BIT_S = 128 / CARRIER_HZ          # one bit: about 9.44 microseconds
BITS_PER_BYTE = {"A": 9, "B": 10}
BLOCK_OVERHEAD = 3                # PCB + CRC

# (step, command bytes, response bytes incl. the 2-byte status word)
TAP = [
    ("SELECT PPSE",            20,  50),
    ("SELECT application",     13,  70),
    ("GET PROCESSING OPTIONS", 41, 230),
    ("READ RECORD 1",           5, 180),
    ("READ RECORD 2",           5, 150),
    ("READ RECORD 3",           5,  60),
]

def air_ms(n_bytes, card_type):
    return (n_bytes + BLOCK_OVERHEAD) * BITS_PER_BYTE[card_type] * BIT_S * 1000

for card_type in "AB":
    total = sum(air_ms(c, card_type) + air_ms(r, card_type) for _, c, r in TAP)
    print(f"Type {card_type}: {total:.1f} ms in the air")
The same in C#
C#
const double CarrierHz = 13_560_000;
const double BitS = 128 / CarrierHz;   // one bit: about 9.44 microseconds
const int BlockOverhead = 3;           // PCB + CRC

(string Step, int Cmd, int Rsp)[] tap =
[
    ("SELECT PPSE", 20, 50),
    ("SELECT application", 13, 70),
    ("GET PROCESSING OPTIONS", 41, 230),
    ("READ RECORD 1", 5, 180),
    ("READ RECORD 2", 5, 150),
    ("READ RECORD 3", 5, 60),
];

foreach (var (type, bitsPerByte) in new[] { ("A", 9), ("B", 10) })
{
    double AirMs(int n) => (n + BlockOverhead) * bitsPerByte * BitS * 1000;
    double total = tap.Sum(s => AirMs(s.Cmd) + AirMs(s.Rsp));
    Console.WriteLine($"Type {type}: {total:F1} ms in the air");
}

The full script, at the end of the post, also prints each step:

Output
Type A: one byte takes 85.0 µs
  SELECT PPSE               20 +  50 bytes    6.5 ms
  SELECT application        13 +  70 bytes    7.6 ms
  GET PROCESSING OPTIONS    41 + 230 bytes   23.5 ms
  READ RECORD 1              5 + 180 bytes   16.2 ms
  READ RECORD 2              5 + 150 bytes   13.7 ms
  READ RECORD 3              5 +  60 bytes    6.0 ms
  in the air                     829 bytes   73.5 ms of the 500 ms budget

Type B: one byte takes 94.4 µs
  ...
  in the air                     829 bytes   81.7 ms of the 500 ms budget

About 830 bytes cross the air, and that takes 75 to 80 ms. It ignores the short gaps between frames, so treat it as a minimum. Even so, the radio isn't where the time goes. Most of the half second belongs to the chip computing its cryptogram and signature, which is exactly why the card gets the bigger share.

The numbers also explain a habit of contactless card design. Every extra record the reader has to fetch costs 10 to 20 ms of air time, and every extra command costs a round trip. A card set up well for contactless keeps its records few and small. The reference cards EMVCo uses to test readers are built the same way: no chaining, no wait-time extensions except on the command that starts the cryptography, and only a few records.

The lights and the tones

A contactless reader should have four status lights, either real LEDs or drawn on its screen. Together they show where the tap has got to: not ready, idle, ready to read, processing, card read successfully, or an error.

There are only two sounds:

  • The success tone: a sine wave of about 1500 Hz, lasting about 500 ms.
  • The alert tone: a lower 750 Hz double beep, 200 ms on, 200 ms off, 200 ms on.

So the success tone lasts about as long as the whole card conversation it announces.

The "card read successfully" signal should come as soon as the reader has the data it needs, so that people learn one consistent moment when they can take the card away. And errors the reader can recover from quickly are kept quiet on purpose. If the reader warned you, you'd start waving the card around, maybe out of the field, just when the reader is trying to fix things.

After the beep

Once the card has gone, the terminal works out the result. If the kernel approved or declined offline, the result should be on screen within 250 ms of the card's last response. If the transaction goes online, the terminal's own work, building the request and then handling the answer, should take no more than 400 ms in total, not counting the network and the bank.

Meanwhile the reader shows "not ready". An online authorisation in progress is the textbook case: the card has left, and there's nothing to talk to.

What the bank can't send back

This is the part that changes how cards are designed.

On a contact transaction the card stays in the slot while the bank answers. The answer can carry data meant for the chip, and the terminal passes it on. The bank's own cryptogram, Issuer Authentication Data (tag 91), goes back to the card in the second GENERATE AC or an EXTERNAL AUTHENTICATE. Issuer scripts (tags 71 and 72) carry commands that update the card: change a limit, reset a counter, unblock a PIN. An online response to a contactless transaction can carry the same tags.

On a normal tap, there's no chip left to give them to. The bank's answer stops at the terminal.

There are two ways round this, both variants of the Online Request outcome:

  • Two presentments. The reader shows "Authorising, please wait" and then "Present card again". You tap a second time, and the kernel delivers the bank's data to the card.
  • Present and hold. The card stays in the field while the terminal goes online, with a removal timeout set by the kernel.

Both cost the cardholder something: a second tap, or a longer wait. So the usual design keeps the tap short, and the issuer accepts that anything it wants to change on the chip waits for a later transaction that allows it.

What's next

Half a second, one beep, and a bank that answers after the card has gone. That's the frame every contactless kernel works inside.

Next in Behind the Tap: the same half second, from a phone. The terminal can't tell your phone from a card, so how do Apple Pay and Google Pay fit into all of this, and why can a phone pay amounts a card can't?

The full scripts

Both run with nothing installed beyond Python 3 or .NET 10 (python3 tap_budget.py, or dotnet run TapBudget.cs), and print the same table.

tap_budget.py
Python
"""How long a contactless tap spends just moving bytes through the air.

EMV Contactless Book D sets the bit rate at fc/128, where fc is the 13.56 MHz carrier (about 106 kbit/s).
Type A sends each byte as 8 data bits plus a parity bit; Type B as a start bit, 8 data bits and a stop bit.
Each command and response also travels in a block with a 1-byte header (PCB) and a 2-byte CRC.
The APDU sizes are rounded figures for a typical tap, not taken from a real card.
"""
CARRIER_HZ = 13_560_000
BIT_S = 128 / CARRIER_HZ          # one bit: about 9.44 microseconds
BITS_PER_BYTE = {"A": 9, "B": 10}
BLOCK_OVERHEAD = 3                # PCB + CRC

# (step, command bytes, response bytes incl. the 2-byte status word)
TAP = [
    ("SELECT PPSE",            20,  50),
    ("SELECT application",     13,  70),
    ("GET PROCESSING OPTIONS", 41, 230),
    ("READ RECORD 1",           5, 180),
    ("READ RECORD 2",           5, 150),
    ("READ RECORD 3",           5,  60),
]

def air_ms(n_bytes: int, card_type: str) -> float:
    return (n_bytes + BLOCK_OVERHEAD) * BITS_PER_BYTE[card_type] * BIT_S * 1000

for card_type in "AB":
    total = 0.0
    print(f"Type {card_type}: one byte takes {BITS_PER_BYTE[card_type] * BIT_S * 1e6:.1f} µs")
    for step, cmd, rsp in TAP:
        t = air_ms(cmd, card_type) + air_ms(rsp, card_type)
        total += t
        print(f"  {step:<24} {cmd:>3} + {rsp:>3} bytes  {t:5.1f} ms")
    print(f"  {'in the air':<24} {sum(c + r for _, c, r in TAP):>9} bytes  {total:5.1f} ms of the 500 ms budget\n")
TapBudget.cs
C#
// How long a contactless tap spends just moving bytes through the air (.NET 10: dotnet run TapBudget.cs).
// EMV Contactless Book D: bit rate fc/128 (fc = 13.56 MHz, about 106 kbit/s). Type A: 8 data bits + parity per byte;
// Type B: start bit + 8 data bits + stop bit. Each block adds a 1-byte PCB and a 2-byte CRC.
// The APDU sizes are rounded figures for a typical tap, not taken from a real card.
const double CarrierHz = 13_560_000;
const double BitS = 128 / CarrierHz;   // one bit: about 9.44 microseconds
const int BlockOverhead = 3;           // PCB + CRC

(string Step, int Cmd, int Rsp)[] tap =
[
    ("SELECT PPSE", 20, 50),
    ("SELECT application", 13, 70),
    ("GET PROCESSING OPTIONS", 41, 230),
    ("READ RECORD 1", 5, 180),
    ("READ RECORD 2", 5, 150),
    ("READ RECORD 3", 5, 60),
];

foreach (var (type, bitsPerByte) in new[] { ("A", 9), ("B", 10) })
{
    double AirMs(int n) => (n + BlockOverhead) * bitsPerByte * BitS * 1000;
    double total = 0;
    Console.WriteLine($"Type {type}: one byte takes {bitsPerByte * BitS * 1e6:F1} µs");
    foreach (var (step, cmd, rsp) in tap)
    {
        double t = AirMs(cmd) + AirMs(rsp);
        total += t;
        Console.WriteLine($"  {step,-24} {cmd,3} + {rsp,3} bytes  {t,5:F1} ms");
    }
    Console.WriteLine($"  {"in the air",-24} {tap.Sum(s => s.Cmd + s.Rsp),9} bytes  {total,5:F1} ms of the 500 ms budget\n");
}

Sources: EMV Contactless Book A v2.12 (architecture and general requirements), Book D (the contactless communication protocol) and EMV 4.3 Book 3 (issuer authentication and issuer scripts). All are free from emvco.com.