Tap to Pay Reference
API reference for the ProximityReader framework. Covers PaymentCardReader, PaymentCardReaderSession, the event stream, the deprecated update-handler signature, Store and Forward mode, and the brief MobileDocumentReader cross-reference for Tap to Present ID.
When to Use This Reference
Use this reference when:
- Looking up
PaymentCardReaderinitializers, instance methods, and theeventsasync sequence - Checking the static
PaymentCardReader.isSupportedsemantics for capability gating - Looking up
PaymentCardReader.Eventcases (updateProgress,readyForTap) - Looking up
PaymentCardReaderSessionmethods (readPayment,readPaymentCard,refundPayment,readPass,cancel) - Migrating from the deprecated
prepare(using:updateHandler:)to the async stream API - Implementing Store and Forward mode for offline capture (PSP-dependent)
- Disambiguating
PaymentCardReaderfromMobileDocumentReader(Tap to Present ID) - Wiring
ProximityReaderDiscoveryas the merchant tutorial UI
Example Prompts
Questions developers ask that this reference answers:
- "What are the cases of
PaymentCardReader.Event?" - "What's the modern replacement for
prepare(using:updateHandler:)?" - "Does
PaymentCardReaderconform toSendable?" - "How do I read an NFC loyalty pass without charging?"
- "What does
PaymentCardReader.fetchPaymentCardReaderStore()do?" - "What's
MobileDocumentReader, and is it part ofaxiom-payments?"
What's Covered
- Framework availability — iOS 15.4+, iPadOS 15.4+, Mac Catalyst 17.0+; cannot be used in iOS Simulator
PaymentCardReader—init(options:),isSupported(class property),readerIdentifier,options,eventsasync sequence,prepare(using:),isAccountLinked(using:),linkAccount(using:),relinkAccount(using:),fetchPaymentCardReaderStore(),prepareStoreAndForward()PaymentCardReader.Options— opaque PSP-supplied configurationPaymentCardReader.Token— PSP-issued, runtime-fetched, TTL-bounded- Deprecations —
id(replaced byreaderIdentifier),prepare(using:updateHandler:)(replaced byprepare(using:)+eventsstream),PaymentCardReader.UpdateEvent(replaced byPaymentCardReader.Event) PaymentCardReader.Event—updateProgress(Int)(0-100, for determinate progress UI),readyForTap; per-transaction success/failure delivered through the session async APIPaymentCardReaderSession—readPayment(_:)for charges,readPaymentCard(_:)for non-charging lookup,refundPayment(_:)for refunds,readPass(_:)for NFC loyalty pass reads,cancel()PaymentCardTransactionandPaymentCardLookupResult— opaque result types- NFC pass reading — combined-mode (pass + payment in one tap) and standalone-pass-only modes; cross-reference to the
pass.jsonnfcblock schema - Read errors — categories (cancellation, timeout, unsupported card, issuer decline, SCA required, reader not configured, entitlement missing) with recovery guidance; PSP SDKs wrap these in typed hierarchies
- Store and Forward mode —
prepareStoreAndForward(),fetchPaymentCardReaderStore(); PSP-supported, not Apple-supported, with chargeback risk MobileDocumentReader(Tap to Present ID, WWDC23) — separate class on the same framework for reading driver's licenses and state IDs; out of scope foraxiom-paymentsbut cross-referenced here so developers searching ProximityReader land in the right placeProximityReaderDiscovery— system-provided merchant tutorial UI, Apple-maintained and localized- Pipeline state diagram — the foreground → prepare → readyForTap → read → completed → re-prepare-on-foreground loop
- Threading model —
Sendableconformance, single-consumereventsasync stream - Capability detection — defensive
isSupportedgating before showing the Tap to Pay button
Documentation Scope
This page documents the tap-to-pay-ref skill — the ProximityReader framework API surface.
- For the entitlement workflow, PSP onboarding, prepare-on-foreground discipline, HIG button label rule, see Tap to Pay
- For NFC loyalty pass schema the reader consumes, see Wallet Passes and Wallet Passes Reference
- For failure modes (entitlement stuck, prepare not called,
isSupportedfalse), see Payments Diagnostics - For the sibling acceptance API for online card flows on the same device, see Apple Pay Reference