Skip to main content
Every pass has a scannable code, set via the pass’s code field and rendered on the front of the pass. By default this is a QR code, but you can choose a different barcode format per template via the barcodeFormat field. Passform supports the four barcode formats that both Apple Wallet and Google Wallet render natively: QR, PDF417, Aztec, and Code128. Apple Wallet’s barcode support is limited to exactly these four formats, so restricting to this set guarantees every format works on both wallets with no fallback or platform-specific behavior. barcodeFormat is set on the template, not the individual pass — every pass issued from a template renders its code in that template’s chosen format. The code value itself remains a per-pass field; see Updating passes for how to set or change it.

Choosing a format

Set it when creating or updating a template:
If omitted, barcodeFormat defaults to QR.

Code length and character limits

Each format has a different data capacity, and 1D formats additionally restrict which characters they can encode reliably. Passform validates a pass’s code against its template’s barcodeFormat when the pass is created or updated, and rejects a code that doesn’t fit.
These limits are set well below each format’s theoretical maximum capacity to keep the resulting barcode reliably scannable at typical wallet-pass size. A longer, denser code is technically encodable but becomes harder for a scanner to read reliably at that size.
If a code violates the selected format’s limit, the API returns a 400 error and the pass is not created or updated:
Switching an existing template’s barcodeFormat to a stricter format (for example, from QR to Code128) does not retroactively validate codes already issued on existing passes — only future creates and updates are checked. Confirm your existing code values fit the new format’s limits before switching.