Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
GuideAPIIntegrationWallet

Pass lifecycle API

Create, update, notify, deactivate and track Apple Wallet and Google Wallet passes with The Wallet Crew API, across the full lifecycle of a pass.

The Wallet Crew API manages a pass from creation to wallet removal. It supports pass updates, wallet notifications, and lifecycle events for Apple Wallet and Google Wallet.

Use this guide to choose the right lifecycle action. Use the API reference for schemas, parameters, and responses.

Before managing a pass

Passes use identifiers to connect each wallet pass to external records. These identifiers let connectors fetch the latest source data during rendering.

Review Pass data and sync before designing an integration, and to choose stable identifier keys.

Pass state model

The Wallet Crew has no universal pass state field. Pass data defines the state. Liquid templates map that data to native wallet fields.

Apple Wallet supports these state-related fields:

  • voided — a boolean that marks the pass invalid in the wallet. Set it to false to reverse the change.

  • expirationDate — an ISO 8601 date that defines when the pass expires.

Google Wallet supports these state-related fields:

  • state — one of ACTIVE, COMPLETED, EXPIRED, or INACTIVE.

  • validTimeInterval — the time window during which the pass remains valid.

What the holder sees depends on the field:

What needs to be expressed
Apple Wallet
Google Wallet

The pass is used or consumed

voided: true: the pass appears grayed out

state: COMPLETED or INACTIVE: the pass moves to the expired section

The pass has expired over time

expirationDate: the pass is removed from the active passes after this date

validTimeInterval: the pass moves to expired when the interval ends

Map the relevant fields in the Apple Wallet and Google Wallet templates. The displayed state changes only after a pass renders again.

The Wallet Crew has no soft-delete or archive state. The API does not delete pass records. To deactivate a pass, update the relevant platform state field.

Creating a pass

Create a pass through the operation below. Supply at least one external identifier from the source system. The operation needs the tenant.pass:write scope, or proof of each identifier.

Without tenant.pass:write, each identifier must be proven in one of these ways:

  • a {key}.hmac value: the HMAC of the value with the tenant security secret (see the API reference example);

  • a {key}.secret value, checked by the connector that owns the key;

  • the key is listed as an allowed unsigned identifier in the tenant security configuration.

The platform drops unproven identifiers and refuses the request when none is left. With the scope, identifiers need no proof. Nothing is sent to a device until the holder downloads the pass.

Connector data is fetched when the pass first renders, so include the identifiers a connector needs to locate the external record.

Issue a pass

post
/api/{tenantId}/passes

Without tenant.pass:write, each identifier must be proven by a {key}.hmac or {key}.secret entry; unproven ones are dropped and the request is refused when none is left. The identifiers of an authenticated holder are added. Nothing is sent to a device until the holder downloads the pass.

POST /api/{tenantId}/passes?passType=loyalty
{ "identifiers": { "shopify.customerId": "12345", "shopify.customerId.hmac": "{hmac}" }, "additionalData": { "loyaltyTier": "silver" } }
Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitOptional
Authorization URL:
Path parameters
tenantIdstringRequired
Query parameters
passTypestringOptional

Pass template to issue the pass from; matched exactly.

Tagsstring[]Optional

Comma-separated campaign tags, the first segment of neo.src; duplicates are dropped.

MediumstringOptional

Channel the link was sent through (for example email, sms), the second segment.

OriginstringOptional

Page or system the holder came from, the third segment; defaults to the Referer header.

UserAgentstringOptional

Taken from the request's User-Agent header, not from neo.src.

Body

Content of a new pass.

additionalDataobject · nullableOptional

Free data stored with the pass and available to its templates.

themeIdstring · nullableOptional

Theme applied to the pass. Omit or null to leave it unchanged (none on create); an empty string removes it. An unknown id is refused with a 400.

extensionsobject · nullableOptional

Initial state of the pass's extensions, keyed by name (apple, google).

Responses
200

The pass was created; the body is its id.

stringOptional
post/api/{tenantId}/passes
POST /api/{tenantId}/passes HTTP/1.1
Host: api.thewalletcrew.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "extensions": null,
  "identifiers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "additionalData": null,
  "themeId": null
}
text

Avoid duplicate passes

POST /passes does not look for an existing pass with the same identifiers: each call creates a new pass. Check for an existing pass before creating one for the same customer:

  1. Call GET /api/{tenantId}/passes/findPass with the identifiers as query parameters ({key}={value}) and, optionally, passType. Without tenant.pass:read, add a {key}.hmac or {key}.secret proof for each identifier.

  2. 200 returns the id of the most recently created matching pass. Reuse that pass. 204 means no pass matches: create it with POST /passes.

  3. To change an existing pass, use PATCH /passes with id.{key}={value}. When several passes match, one is updated.

Use the same stable identifier keys on every call. Different keys for the same customer cannot be matched.

Updating pass data

Use the operation below to update pass data and request a wallet refresh. Submitted fields merge with the existing pass data. Omitted fields remain unchanged. An empty value or null removes the submitted field.

Update a pass by identifiers

patch
/api/{tenantId}/passes

Same changes, delivery and responses as PATCH /passes/{passId}, addressing the pass by id or by external identifiers.

PATCH /api/{tenantId}/passes?id.shopify.customerId=12345
{ "additionalData": { "loyaltyTier": "gold" } }
Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired
Authorization URL:
Path parameters
tenantIdstringRequired
Query parameters
passTypestringOptional

Query: only a pass of this pass template matches. Use passType in the body to move the pass to another template.

Body

Changes to one pass. Omitted fields are left as they are.

additionalDataobject · nullableOptional

Free data stored with the pass and available to its templates.

themeIdstring · nullableOptional

Theme applied to the pass. Omit or null to leave it unchanged (none on create); an empty string removes it. An unknown id is refused with a 400.

passTypestring · nullableOptional

Pass template to move the pass to. Omitted or blank keeps the current one; an unknown name is refused with a 400.

updateMetadatabooleanOptionalDeprecated

Replaced by options.updateMetadata.

Default: false
bypassQueuebooleanOptionalDeprecated

Replaced by options.bypassQueue.

Default: false
Responses
200

Applied and pushed within the request (options.bypassQueue true).

No content

patch/api/{tenantId}/passes
PATCH /api/{tenantId}/passes HTTP/1.1
Host: api.thewalletcrew.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 178

{
  "identifiers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "additionalData": null,
  "themeId": null,
  "passType": null,
  "options": {
    "bypassQueue": false,
    "updateMetadata": true,
    "correlationId": null
  }
}

No content

Push notification behavior

Pass updates operate at two levels. The Wallet Crew always updates the pass record, whatever the installation status. It then notifies Apple Wallet and Google Wallet only when the pass has an active registration: an uninstalled pass gets no device notification, and a later installation receives the latest version.

The update flow for Apple Wallet, in order:

For Google Wallet, The Wallet Crew updates the pass object through the Google Wallet API. The device does not call back.

Queue and deduplication

The Wallet Crew queues updates by default (options.bypassQueue: false). The queue protects system throughput and deduplicates work. If another update reaches the same pass before the queued task runs, the queue skips the earlier task.

Set options.bypassQueue: true for urgent synchronous updates, such as boarding status updates that must reach the wallet immediately. The call then returns 200; a queued update returns 202. The top-level bypassQueue field is deprecated.

For template mappings and pass fields, see Update pass data in templates.

Sending a standalone notification

Send a text notification without changing pass data with the operation below. The notification appears in the wallet application independently of a data update.

Use content for a plain string. Use localizedContent for an object keyed by ISO 639 language codes. Use one content format per request.

Notify a pass holder by pass id

put
/api/{tenantId}/passes/{passId}/notification

Queued by default: 202 means accepted, not yet sent. options.bypassQueue sends synchronously (200). The message appears on the pass in the wallet: Apple devices also refresh the whole pass; Google passes get the message added.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired
Authorization URL:
Path parameters
passIdstringRequired

Pass id assigned by the platform.

tenantIdstringRequired
Body

The message to show the holder, in one or several languages.

contentstring · nullableOptional

Message for devices whose language has no entry in localizedContent. Optional when localizedContent has text; defaults to the tenant's default language entry, else the first language in ordinal order.

localizedContentobject · nullableOptional

Message per device language. Keys are a lowercase ISO 639-1 code, optionally with an uppercase region (en, fr-FR). Entries with blank text are not sent.

Responses
200

Notification sent synchronously (options.bypassQueue true).

No content

put/api/{tenantId}/passes/{passId}/notification
PUT /api/{tenantId}/passes/{passId}/notification HTTP/1.1
Host: api.thewalletcrew.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 112

{
  "content": null,
  "localizedContent": null,
  "options": {
    "updateData": false,
    "correlationId": null,
    "bypassQueue": false
  }
}

No content

Wallet removal

When an end-user removes a pass, the wallet platform notifies The Wallet Crew. Apple sends an HTTP DELETE request to the Apple registrations route. Google sends a message with eventType = "del".

The Wallet Crew sends Pass:Uninstalled each time a pass is removed from the last device of a wallet, Apple Wallet or Google Wallet. Removing a pass from one of two iPhones does not send the event. The registrationInformation counts in the payload tell whether another installation is still active.

Removing a pass from a wallet does not delete its The Wallet Crew record. The pass can be installed again later.

The Pass:Uninstalled payload is described in Webhooks. Configure endpoint delivery and validate signatures there too.

Migrate from the privilege API

The former privilege endpoints still answer and forward to benefits, but they are deprecated. New integrations use the benefit endpoints, and existing ones should move when they are next updated.

Former name
Current name

Privilege

Benefit

Offer (reusable definition)

Benefit template

Activation

Automation with the Grant a benefit action

Crew Check

Pass Scanner

/passes/{passId}/privileges

/passes/{passId}/benefits

/passes/privileges

/passes/benefits

POST /passes/{passId}/offers/{offerId}

POST /passes/{passId}/benefitTemplates/{benefitTemplateId}

Permission tenant.configuration.offer

Permission tenant.configuration.benefitTemplate

Events Privilege:*, Offer:*

Events Benefit:*, BenefitTemplate:*

Liquid privileges, privilegeStats

Liquid benefits, benefitStats

Automation setting offerId

Automation setting benefitTemplateId

Automation triggers offerRedeemed, offerCredited, offerMovement

benefitRedeemed, benefitCredited, benefitMovement

Behavior autoRedeem

Behavior mode redeemOnScan

The Unlockable privilege type no longer exists. Progress towards a reward is handled by a stamp card, whose goal grants a reward benefit. The Liquid variables are described in Benefits on a pass.

FAQ

Can a pass be deleted through the API?

No. The API does not delete pass records. Set the platform-specific state fields to deactivate a pass.

Can I use failed updates to detect uninstalled passes?

No. Updates do not fail when a pass is uninstalled. The Wallet Crew processes the backend update successfully. No device push is sent when the pass has no active registrations.

Check installation status in the pass details of the admin console, or with GET /api/{tenantId}/passes (filter field installationStatus). Alternatively, listen for Pass:Installed and Pass:Uninstalled events.

Last updated