Barcode & NFC Reference


Daniel Baudino

Updated January 20, 2026

TL;DR: Technical specifications for barcodes and NFC in Apple Wallet and Google Wallet passes.
  • Both platforms support QR, Aztec, PDF417, and Code 128
  • Use 2D barcodes (QR, Aztec, PDF417) for smartphone screens
  • NFC requires Apple/Google certification and compatible terminals
  • Apple: Value Added Services (VAS) protocol
  • Google: Smart Tap protocol
  • Rotating barcodes supported for enhanced security

Overview

This reference covers barcode formats and NFC specifications for wallet passes. Both platforms support similar barcode types, but NFC implementations differ significantly.

Key distinction: Barcodes work with any compatible scanner. NFC requires certified terminals and approved credentials.


Barcode Formats

Supported Formats by Platform

FormatApple WalletGoogle WalletTypeBest For
QR CodeYesYes2DGeneral purpose, high capacity
AztecYesYes2DCompact, no quiet zone needed
PDF417YesYes2DHigh density, boarding passes
Code 128Yes (iOS 9+)Yes1DLegacy systems

Format Specifications

SpecificationValue
Data capacity4,296 alphanumeric chars
Error correctionL (7%), M (15%), Q (25%), H (30%)
Quiet zone4 modules minimum
Best forGeneral purpose, URLs, large payloads
SpecificationValue
Data capacity3,832 alphanumeric chars
Error correction5% to 95% configurable
Quiet zoneNot required
Best forSpace-constrained, mobile ticketing
SpecificationValue
Data capacity1,850 alphanumeric chars
Error correction9 levels (0-8)
StructureMulti-row stacked
Best forBoarding passes, IDs, high-density data
SpecificationValue
Data capacityVariable (ASCII 128)
TypeLinear (1D)
watchOS supportNo (Apple)
Best forLegacy scanner compatibility

Barcode Recommendations

Use 2D barcodes (QR, Aztec, PDF417) for wallet passes: - Better scanning on LCD screens - Higher data capacity - More reliable in real-world conditions - Supported by optical scanners

Avoid 1D barcodes unless required: - Laser scanners struggle with LCD screens - Lower data capacity - More susceptible to damage/distortion


Apple Wallet Barcode Configuration

JSON Structure

json
{ "barcodes": [ { "format": "PKBarcodeFormatQR", "message": "PASS123456789", "messageEncoding": "iso-8859-1", "altText": "PASS123456789" } ] }

Format Values

Format ConstantBarcode Type
PKBarcodeFormatQRQR Code
PKBarcodeFormatAztecAztec
PKBarcodeFormatPDF417PDF417
PKBarcodeFormatCode128Code 128

Encoding Options

EncodingUse Case
iso-8859-1Most scanners (recommended)
utf-8Unicode support

Note: Most barcode scanners use ISO 8859-1 or Windows-1252 encoding. Unicode is poorly supported by scanning systems.

Multiple Barcodes

iOS 9+ uses the barcodes array. For backwards compatibility with iOS 8:

json
{ "barcode": { "format": "PKBarcodeFormatQR", "message": "PASS123456789", "messageEncoding": "iso-8859-1" }, "barcodes": [ { "format": "PKBarcodeFormatQR", "message": "PASS123456789", "messageEncoding": "iso-8859-1" } ] }

watchOS Considerations

  • Code 128 not supported
  • Rectangular barcodes rotated to portrait
  • Barcode placed at bottom of pass

Google Wallet Barcode Configuration

JSON Structure

json
{ "barcode": { "type": "QR_CODE", "value": "PASS123456789", "alternateText": "PASS123456789" } }

Type Values

Type ConstantBarcode Type
QR_CODEQR Code
AZTECAztec
PDF_417PDF417
CODE_128Code 128
TEXT_ONLYNo barcode, text display

Rotating Barcodes

Google Wallet supports rotating barcodes for enhanced security:

Supported FormatsNot Supported
QR_CODEAZTEC
PDF_417CODE_128

Behavior: - Barcode pattern refreshes every ~60 seconds - Screenshots become invalid quickly - Requires backend integration for validation


NFC Specifications

Platform Comparison

AspectApple WalletGoogle Wallet
ProtocolValue Added Services (VAS)Smart Tap
CertificationRequired from AppleRequired from Google
Payload size64 bytesVaries
Express ModeSupportedN/A
Hands-freeYes (with Express Mode)Yes (with Smart Tap)

Apple Wallet NFC (VAS)

  1. NFC Certificate — Apply through Apple Developer Program (~4 weeks approval)
  2. Compatible terminal — VAS protocol support required
  3. Enhanced Passbook certificate — Included in NFC-enabled pass signing
json
{ "nfc": { "message": "CUSTOMER_ID_12345", "encryptionPublicKey": "MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgAC..." } }
RequirementSpecification
FormatBase64-encoded X.509 SubjectPublicKeyInfo
Key typeECDH public key
CurveP256 (secp256r1)
FormCompressed (x-coordinate only)

Generation command: bash openssl ec -in private.pem -pubout -conv_form compressed

Express Mode allows NFC passes to work without unlocking the device: - Must be enabled by user - Works with Face ID, Touch ID, or passcode devices - Ideal for high-throughput access control

Google Wallet NFC (Smart Tap)

  1. Smart Tap certification — Required from Google
  2. Compatible terminal — From certified provider
  3. Redemption Issuer configuration — Collector ID and keys
  • Advanced Card Systems Ltd.
  • Contactless Technologies B.V.
  • Intercard Inc.
  • Ubiquiti Inc.
  • UIC Payworld Inc.

Passes must include redemptionIssuers property in the class:

json
{ "redemptionIssuers": ["1234567890123456789"] }
  • Only one pass transmitted per tap
  • If multiple eligible passes, user sees selection carousel
  • Terminal authenticates using collector keys
  • Data transmitted in encrypted form

Scanner Recommendations

For Wallet Passes

Scanner TypeLCD CompatibilityRecommendation
Optical (2D imager)ExcellentRecommended
Camera-basedGoodAcceptable
LaserPoorNot recommended

Testing Considerations

  1. Multiple angles — Test scanning at various tilts
  2. Brightness levels — Low/high screen brightness
  3. Distance — Near and far scanning range
  4. Speed — Fast scan scenarios (gate throughput)

Security Considerations

Barcode Security

RiskMitigation
Screenshot sharingRotating barcodes
Barcode copyingOne-time use validation
Replay attacksTime-stamped payloads

NFC Security

FeaturePurpose
Encrypted transmissionPrevents interception
Terminal authenticationPrevents rogue readers
Certificate requirementsLimits abuse
Payload encryptionProtects sensitive data

Common Mistakes

Using laser scanners — Most cannot read LCD screens reliably.

Choosing 1D barcodes — Lower reliability and capacity for mobile.

Skipping NFC certification — Passes won't work without proper setup.

Ignoring encoding — Wrong encoding causes scan failures.

No fallback — NFC fails, no barcode backup visible.


Sources

Was this article helpful?
Yes No