Barcode & NFC Reference
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
| Format | Apple Wallet | Google Wallet | Type | Best For |
|---|---|---|---|---|
| QR Code | Yes | Yes | 2D | General purpose, high capacity |
| Aztec | Yes | Yes | 2D | Compact, no quiet zone needed |
| PDF417 | Yes | Yes | 2D | High density, boarding passes |
| Code 128 | Yes (iOS 9+) | Yes | 1D | Legacy systems |
Format Specifications
| Specification | Value |
|---|---|
| Data capacity | 4,296 alphanumeric chars |
| Error correction | L (7%), M (15%), Q (25%), H (30%) |
| Quiet zone | 4 modules minimum |
| Best for | General purpose, URLs, large payloads |
| Specification | Value |
|---|---|
| Data capacity | 3,832 alphanumeric chars |
| Error correction | 5% to 95% configurable |
| Quiet zone | Not required |
| Best for | Space-constrained, mobile ticketing |
| Specification | Value |
|---|---|
| Data capacity | 1,850 alphanumeric chars |
| Error correction | 9 levels (0-8) |
| Structure | Multi-row stacked |
| Best for | Boarding passes, IDs, high-density data |
| Specification | Value |
|---|---|
| Data capacity | Variable (ASCII 128) |
| Type | Linear (1D) |
| watchOS support | No (Apple) |
| Best for | Legacy 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
{
"barcodes": [
{
"format": "PKBarcodeFormatQR",
"message": "PASS123456789",
"messageEncoding": "iso-8859-1",
"altText": "PASS123456789"
}
]
}
Format Values
| Format Constant | Barcode Type |
|---|---|
| PKBarcodeFormatQR | QR Code |
| PKBarcodeFormatAztec | Aztec |
| PKBarcodeFormatPDF417 | PDF417 |
| PKBarcodeFormatCode128 | Code 128 |
Encoding Options
| Encoding | Use Case |
|---|---|
| iso-8859-1 | Most scanners (recommended) |
| utf-8 | Unicode 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:
{
"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
{
"barcode": {
"type": "QR_CODE",
"value": "PASS123456789",
"alternateText": "PASS123456789"
}
}
Type Values
| Type Constant | Barcode Type |
|---|---|
| QR_CODE | QR Code |
| AZTEC | Aztec |
| PDF_417 | PDF417 |
| CODE_128 | Code 128 |
| TEXT_ONLY | No barcode, text display |
Rotating Barcodes
Google Wallet supports rotating barcodes for enhanced security:
| Supported Formats | Not Supported |
|---|---|
| QR_CODE | AZTEC |
| PDF_417 | CODE_128 |
Behavior: - Barcode pattern refreshes every ~60 seconds - Screenshots become invalid quickly - Requires backend integration for validation
NFC Specifications
Platform Comparison
| Aspect | Apple Wallet | Google Wallet |
|---|---|---|
| Protocol | Value Added Services (VAS) | Smart Tap |
| Certification | Required from Apple | Required from Google |
| Payload size | 64 bytes | Varies |
| Express Mode | Supported | N/A |
| Hands-free | Yes (with Express Mode) | Yes (with Smart Tap) |
Apple Wallet NFC (VAS)
- NFC Certificate — Apply through Apple Developer Program (~4 weeks approval)
- Compatible terminal — VAS protocol support required
- Enhanced Passbook certificate — Included in NFC-enabled pass signing
{
"nfc": {
"message": "CUSTOMER_ID_12345",
"encryptionPublicKey": "MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgAC..."
}
}
| Requirement | Specification |
|---|---|
| Format | Base64-encoded X.509 SubjectPublicKeyInfo |
| Key type | ECDH public key |
| Curve | P256 (secp256r1) |
| Form | Compressed (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)
- Smart Tap certification — Required from Google
- Compatible terminal — From certified provider
- 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:
{
"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 Type | LCD Compatibility | Recommendation |
|---|---|---|
| Optical (2D imager) | Excellent | Recommended |
| Camera-based | Good | Acceptable |
| Laser | Poor | Not recommended |
Testing Considerations
- Multiple angles — Test scanning at various tilts
- Brightness levels — Low/high screen brightness
- Distance — Near and far scanning range
- Speed — Fast scan scenarios (gate throughput)
Security Considerations
Barcode Security
| Risk | Mitigation |
|---|---|
| Screenshot sharing | Rotating barcodes |
| Barcode copying | One-time use validation |
| Replay attacks | Time-stamped payloads |
NFC Security
| Feature | Purpose |
|---|---|
| Encrypted transmission | Prevents interception |
| Terminal authentication | Prevents rogue readers |
| Certificate requirements | Limits abuse |
| Payload encryption | Protects 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
More articles in Technical Reference
This reference provides exact image specifications for Apple Wallet and Google Wallet passes. Use...
Color SpecificationsThis reference covers color configuration for Apple Wallet and Google Wallet passes. The platform...
Field Limits By PlatformThis reference provides field limits and character constraints for Apple Wallet and Google Wallet...