TECHExplained

How Does Tap to Pay Work?

A hand holding a phone near a contactless card reader at a shop counter
Photo: Anna Shvets / Pexels

You hold a card or phone near the checkout reader, it beeps, and the purchase is done. So how does tap to pay work in that short moment? It is a tiny radio conversation, a bit of cryptography and a message to your bank, all run by shared industry standards.

At KKSL News we keep it simple: below is what the reader, the card or phone, and the bank each do, one step at a time.

What is NFC, the radio behind tap to pay?

Tap to pay rides on near field communication, or NFC. The NFC Forum, the industry group that maintains the technology, describes it as a short-range wireless link between devices “just a few centimeters apart” that runs at 13.56 MHz. The figure most often quoted is about 4 cm, or roughly an inch and a half.

That short range comes from how NFC works. The reader and the card each contain a flat coil of wire, a loop antenna. When the two coils are close, they couple magnetically, a bit like the two halves of a transformer with air in between. Pull them apart and the link fades fast; in practice it rarely works past about 10 cm.

The same field also carries power. A plastic card has no battery. The reader’s field supplies the energy the card’s chip needs for the moment it sits in range, which is why only one side of an NFC link has to be powered.

What happens when you tap a contactless card?

The terminal sends out its field. When a card enters it, the chip powers up and the two sides start trading messages under the EMV contactless specifications, written by EMVCo, the technical body that sets the rules for chip payments.

The most important message is the security code. EMVCo says a one-time-use security code is created for each transaction, and that contactless payments use cryptographic functions that make them more secure than magnetic stripe cards. Think of it like a ticket stamp that changes with every ride: the stamp from your last trip does not fit the next one.

What changes when you pay with a phone or watch?

A phone does the same NFC exchange, but it behaves like a card that asks permission first. Apple’s documentation for Apple Pay is a clear example of the design. When an iPhone or Apple Watch detects a reader’s NFC field, it offers your chosen card. Then:

  • you confirm with Face ID, Touch ID or your passcode (transit cards set to Express Mode are the exception),
  • a separate, certified chip called the Secure Element releases a Device Account Number,
  • the phone passes that number and a transaction-specific security code to the terminal.

The Device Account Number is a stand-in for your card number. Apple says it does not store the original card numbers added to Apple Pay, and that neither Apple nor the device sends your actual card number to the store. The Device Account Number itself sits in the Secure Element and is never backed up to iCloud.

Diagram · KKSL News

What happens during a tap

The four steps of a tap-to-pay purchaseFour stacked boxes linked by arrows. One: the reader sends out a 13.56 MHz field that powers the chip. Two: a phone asks you to confirm with face, fingerprint or passcode. Three: the secure chip builds a one-time code from a counter and a key. Four: the code goes to the card issuer, which verifies it.1Reader sends out a 13.56 MHz fieldIt powers the chip in the card or phone by induction2Phone asks you to confirmFace ID, Touch ID or passcode; a plastic card skips this3Secure chip builds a one-time codeMade from a counter that rises each time and a secret key4Code travels to your card issuerThe issuer uses it to verify that one transaction

Read from top to bottom: the red step is the one-time code that makes each tap different from the last.

Source: Apple Platform Security: Payment authorization with Apple Pay, NFC Forum: What is NFC?

How is the one-time code made?

Apple calls the code a cryptogram, a one-time code computed from two ingredients: a transaction counter and a secret key. The counter goes up by one with every new payment. The key is loaded into the payment app on the chip when the card is first set up, and it is known to the payment network, the card issuer or both.

Because the counter keeps moving, each purchase produces a different code. Someone who copied one code would hold a value tied to a counter number that has already been used. The bank, holding the same key, can work out what the correct code should be and compare.

Where does the payment go after the beep?

The terminal does not decide whether you can pay. It passes the account number and the one-time code along, through the card network, to the bank that issued the card.

That bank checks the code. Apple’s security guide says the codes are sent to the issuer, which allows the issuer to verify each transaction. If the code matches what the issuer expects for that card and that counter value, the purchase can go ahead. So the short tap at the counter is only the first leg of the trip; the final yes or no comes from the bank.

Questions readers ask

Can a contactless reader charge a card from across the room?

NFC is built for very short distances. The NFC Forum describes it as working between devices a few centimeters apart, and the working range rarely goes past about 10 cm.

Is my real card number sent when I tap my phone?

With Apple Pay, no. Apple says the phone sends a Device Account Number and a transaction-specific code, and that neither Apple nor the device sends the actual card number.

Does a contactless card need a battery?

No. The card's chip and antenna draw the small amount of power they need from the reader's 13.56 MHz field while the card is held close.

Sources

  1. Apple Support: Apple Pay security and privacy overviewPrimary source (Device Account Number, card number not stored or sent, authentication with Face ID, Touch ID or passcode, Express Mode)
  2. Apple Platform Security: Payment authorization with Apple PayPrimary source (Cryptogram from a transaction counter and key; issuer verifies each transaction)
  3. NFC Forum: What is NFC?Primary source (Range of a few centimeters and the 13.56 MHz operating frequency)
  4. EMVCo: EMV ContactlessPrimary source (One-time-use security code per transaction; cryptography compared with magnetic stripe)
  5. Wikipedia: Near-field communication (About 4 cm typical range, rarely beyond 10 cm, inductive coupling, passive cards powered by the reader)

Spotted an error? Read our editorial policy or tell us. Fixes are logged on the corrections page.