Sudip Paudel May 14, 2025

After adding a pass to Apple Wallet, the server can automatically update that pass by using the PassKit Web Service and push notifications. To automatically update a pass in Apple Wallet, we need to implement a PassKit web service that handles device registrations, serves updated passes, and sends push notifications.

Steps to Automatically Update a Pass in Apple Wallet

1. Include Required Fields in the Pass JSON


"webServiceURL": "https://yourserver.com/passes/",
"authenticationToken": "unique_secure_token"

  • webServiceURL: Specifies the base URL of web service that handles pass updates.
  • authenticationToken: A unique token used to authenticate requests between Apple Wallet and our server.

2. Implement the PassKit Web Service

Now the web service should support the following endpoints:

  • Register Device:

POST /v1/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}/{serialNumber}

Registers a device to receive updates for a specific pass.

  • Unregister Device:

DELETE /v1/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}/{serialNumber}

Unregisters a device from receiving updates.

  • Get Updated Passes:

GET /v1/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}?
passesUpdatedSince={previousLastUpdated}

Returns a list of serial numbers for passes that have been updated.

  • Serve Updated Pass:
 
GET /v1/passes/{passTypeIdentifier}/{serialNumber}

 

Returns the updated .pkpass file for the specified pass.

Ensure that the server authenticates requests using the authenticationToken provided in the pass.

Handle Device Registrations

When a user adds a pass to their Wallet, the device sends a registration request to the server. The server should:

  • Verify the authenticationToken.
  • Store the device’s deviceLibraryIdentifier and pushToken.

Update the Pass and Re-sign

When the pass content changes, we should:

  • Modify the pass.json with the new information.
  • Re-sign the pass using your Pass Type ID certificate and Apple’s WWDR certificate.
  • Ensure the serialNumber and passTypeIdentifier remain unchanged so that the updated pass replaces the existing one.\n

Send Push Notifications

To inform devices about the updated pass:

  • Use the stored pushToken for each registered device.

  • Send a push notification via Apple’s Push Notification Service (APNs) with an empty payload to indicate that an update is available.

Upon receiving the notification, the Wallet app will contact the web service to fetch the updated pass.

 

You May Also Like

Create an Apple Wallet Pass Using Pass JSON File

 

Ps. if you have any questions

Ask here