Skip to main content

Generate a pkpass file for Apple Wallet

An Apple Wallet pass is a .pkpass file: a signed ZIP archive the iPhone opens and adds to the Wallet. You can generate one yourself. Running it in production (signing, certificates, updates, notifications) takes a real server. This guide covers both paths.

What a .pkpass file contains​

FileRole
pass.jsonThe pass description: style, fields, colors, barcode, identifiers
icon.png (+ @2x, @3x)Required: icon shown in notifications and on the lock screen
logo.png, strip.png, thumbnail.png…Optional images, depending on the pass style
manifest.jsonThe SHA-1 hash of every file in the archive
signatureThe detached PKCS #7 signature of manifest.json

The style is set in pass.json with a single key: storeCard (loyalty card), coupon, eventTicket, boardingPass or generic.

Doing it yourself: the steps​

  1. Join the Apple Developer Program (paid membership) and create a Pass Type ID (pass.com.yourbrand.loyalty).
  2. Generate the certificate for that Pass Type ID and export it with its private key. Also download Apple's WWDR intermediate certificate.
  3. Write pass.json with at least formatVersion, passTypeIdentifier, serialNumber, teamIdentifier, organizationName, description and the style key.
  4. Compute manifest.json: the SHA-1 of every file, image by image.
  5. Sign the manifest with the certificate and the WWDR, and write the result to signature.
  6. Zip everything and serve it with the application/vnd.apple.pkpass MIME type.

The certificate expires: renew it before the deadline, or no pass can be installed any more.

The hard part: updates​

A .pkpass is frozen. For a points balance or a boarding gate to change on the iPhone, you need to:

  • set webServiceURL and authenticationToken in pass.json;
  • run a web service that registers devices, lists updated passes and returns the new version of a pass;
  • send an APNs notification to every affected device, with the Pass Type ID certificate;
  • regenerate and re-sign the pass on every change.

And all of that for the iPhone only: Android needs a separate integration, see Integrate the Google Wallet API.

With eldo wallet​

eldo wallet generates and signs the .pkpass files, registers devices and pushes updates. You never handle a certificate, a manifest or APNs. Passes are signed with the eldo wallet certificate: no Apple Developer account needed (large accounts can use their own). See Apple Wallet vs Google Wallet.

Doing it yourselfWith the eldo wallet API
Join the Apple Developer Program ($99/year)Not needed: eldo wallet signs with its own certificate
Write pass.json and the imagesSet up the card once: PATCH/store-cards
Sign and zip one pass per customerCreate the customer: POST/clients
Host the file, handle iPhone and Android separatelyOne add link (shortLink) for Apple Wallet and Google Wallet
Web service + APNs for every updateUpdate the customer: PATCH/clients/{id}/gain
Renew certificatesNothing to do

To get started: the quickstart creates a loyalty card and sends it to a customer in three calls.

Learn more​

API news, once a month

New endpoints, upcoming changes, guides and use cases. No spam, one-click unsubscribe.

Report a technical problem

An API error, a pass that does not update, an email that does not arrive? Describe the problem: our technical team will answer.

For a fast answer, include:

  • The method and endpoint (e.g. POST /clients)
  • The error code returned (errorCode) and the body sent
  • The date and time of the call
  • The identifiers involved (customer, template, pass)

Never include an API token or a password.

AI assistant

Beta

Loading…

AI-generated answers (Claude): double-check important details.

Sign in to use the assistant