> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/update-pass-data-in-templates.md).

# Update pass data in templates

Update existing pass data through The Wallet Crew API, then render the latest values in Apple Wallet and Google Wallet pass templates with Liquid.

Passes are most valuable when they stay accurate over time. The usual pattern is simple: a pass is updated through The Wallet Crew API, then the pass templates render the latest values using Liquid.

<details>

<summary><strong>Real-world examples</strong></summary>

* A loyalty pass shows `points` and `tier` and updates after each purchase.
* An event ticket shows the latest `gate` and `seat` after a schedule change.
* A membership card shows `status` and `expiryDate` after a renewal.

</details>

## What “updated pass data” means

In The Wallet Crew, wallet fields usually come from two places: additional data stored on the pass and live data fetched by connectors at render time. External identifiers help connectors find the right source record. Metadata is computed by the platform for filtering and reporting, not for wallet display.

If the right storage location is unclear, start with [Pass data and sync](https://docs.thewalletcrew.io/developers-guides/pass-architecture/pass-data-and-sync.md).

## Step-by-step: update data, then display it

{% stepper %}
{% step %}

### Update the pass data through the API

Update one pass with `PATCH /api/{tenantId}/passes/{passId}`, or by identifiers with `PATCH /api/{tenantId}/passes`. Update many passes with `POST /api/{tenantId}/passes/pushUpdate`. See [Pass lifecycle → Updating pass data](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/pass-lifecycle.md) and [Batch operations](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/batch-operations.md).

If pass creation is not set up yet, start with [Enrolment flows](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/enrolment-flows.md).
{% endstep %}

{% step %}

### Inspect the updated data on a real pass

Open a pass and look at the JSON payload. This is the source of truth when fields are later referenced in Liquid.

In the admin console, go to **Wallet → Passes**, pick a pass, then open the menu (`...`), click **Details**, and open the **Data** tab.

<div data-with-frame="true"><figure><img src="https://4179171865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOnaDC4sjKAx53j0QV843%2Fuploads%2Fgit-blob-94611cfc3f95d2e23df11edd1d774650cfc41953%2Fpass-details-data-tab-retake.png?alt=media" alt="Data tab of a pass with the identifiers, additional data, metadata and the values loaded at render"><figcaption><p>Use the Data tab to confirm the keys and values that exist on this pass.</p></figcaption></figure></div>
{% endstep %}

{% step %}

### Use Liquid in the pass template

Go to **Wallet → Templates** and edit the template used by the pass.

<div data-with-frame="true"><figure><img src="https://4179171865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOnaDC4sjKAx53j0QV843%2Fuploads%2Fgit-blob-17a17e5f7c21b2c6d218e5df285c4cd8fc54a5e1%2Ftemplate-list-card-menu.png?alt=media" alt="Three-dot menu of a template card with the Edit, Edit Apple, Edit Google, Push update, Export template and Delete actions"><figcaption><p>Edit the template of the pass.</p></figcaption></figure></div>

Then select the section to change. Sections are grouped so that only the relevant part has to be expanded.

<div data-with-frame="true"><figure><img src="https://4179171865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOnaDC4sjKAx53j0QV843%2Fuploads%2Fgit-blob-05d7dd302fc80858010f5942792b66207625f281%2Ftemplate-editor-expandable-sections-native.png?alt=media" alt="Apple tab of the template editor with expandable sections and the pass preview"><figcaption><p>Pick the field where the updated value should appear.</p></figcaption></figure></div>

When dynamic content is needed (conditions, formatting, or computed strings), open the code editor (`<>`) and use Liquid.

<div data-with-frame="true"><figure><img src="https://4179171865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOnaDC4sjKAx53j0QV843%2Fuploads%2Fgit-blob-116ddaf0d0a4362b63c40b93ccbc36543f4bfb5c%2Ftemplate-editor-liquid-value-dialog.png?alt=media" alt="Value dialog of a template field with a Liquid expression, the preview and the available variables"><figcaption><p>Use Liquid when plain text fields are not enough.</p></figcaption></figure></div>

Use [Liquid templating](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/templating-engine.md) for supported Liquid syntax in The Wallet Crew.
{% endstep %}

{% step %}

### Save and validate on a device

Save the template changes, then validate with a pass that can be installed on a phone.

If passes are distributed through a web page or QR flow, validate the hosted view on a real device. If distribution happens from a native app, validate the same pass through the app flow used by the project.
{% endstep %}
{% endstepper %}

## Validation checklist

After an update, confirm four things:

* The stored value exists on the pass, or the connector source record contains the new value.
* The template references the exact key used at render time.
* A render trigger happened, such as preview, installation, or push update.
* The final pass is validated on a real device.

If the value is missing in the **Data** tab, the issue is in the update call or the connector source. If it exists there but not on the rendered pass, the issue is in the template mapping or Liquid logic.

## FAQ

<details>

<summary><strong>What should I use: identifiers, metadata, or additional data?</strong></summary>

Use identifiers to link the pass to external systems. Use metadata (computed from the template) to filter passes for operations. Use additional data for values that must persist on the pass and appear in wallet fields.

See [Pass data and sync](https://docs.thewalletcrew.io/developers-guides/pass-architecture/pass-data-and-sync.md).

</details>

<details>

<summary><strong>Do I need to update the template after every data change?</strong></summary>

No. Templates define how to display data. A template usually changes only when the layout changes or new fields are added. Day-to-day changes should be done by updating pass data through the API.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/update-pass-data-in-templates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
