Wallet passes
Offer tickets and subscriptions as Apple Wallet and Google Wallet passes, and control what each pass shows.
Customers can add their tickets and subscriptions to a phone wallet. Unidy supports two wallets, each through its own plugin:
- Apple Wallet issues a signed
.pkpassfile. iPhones open it in Apple Wallet. Android wallet apps can usually import it too. - Google Wallet creates a native pass at Google and sends the customer to Google's save page.
A brand can use either plugin or both. Every exportable ticket and subscription can also be downloaded as a PDF.
What a pass needs
A wallet button appears only when all of the following are true:
- The brand has an Apple Wallet or Google Wallet plugin. Google Wallet must also be enabled.
- Enable wallet export is switched on for the ticket or subscription's category.
- The ticket or subscription has
wallet_exportdata with aqr_code. Itsexportable_to_walletfield is thentrue.
You can switch on wallet export for a category while its plugin is still disabled. This lets you prepare categories before Google approves your issuer for publishing.
Compare Apple Wallet and Google Wallet
| Apple Wallet | Google Wallet | |
|---|---|---|
| Delivery | .pkpass download on the web, through the SDK HTTP API and the REST API v2 | Redirect to Google's save page, on the customer web pages only |
| Where the pass is stored | In the file on the device | At Google |
| Pass types | One format. style chooses the image layout. | style chooses the pass type: generic, event ticket or loyalty card |
| When the ticket or subscription changes | The device is notified and downloads the updated pass | Unidy sends the updated pass to Google |
| When category branding or customer data changes | Saved passes are not updated | Saved passes are updated |
| Colours | Background, foreground and label colour | Background colour only. Google picks the text colour. |
| End date | The record's end time | Tickets: end time plus the category's grace period, otherwise start time plus one day. Subscriptions: end time. |
| Grouping | Passes are not grouped | Event tickets of the same category and start time are stacked as one event |
| Plugin state needed for export | The plugin exists | The plugin is enabled |
| When the plugin is deleted | Saved passes remain unchanged | After a 24-hour delay that you can cancel, every saved pass is switched off |
What customers see
On the customer subscription and ticket pages, Export options opens a dialog with the available downloads:
| Badge | Shown when |
|---|---|
| Add to Apple Wallet | The brand has an Apple Wallet plugin. |
| Add to Google Wallet | The brand's Google Wallet plugin is enabled. |
WalletPasses (Android import of the .pkpass) | The brand has an Apple Wallet plugin and no enabled Google Wallet plugin. |
| Always, for an exportable record. |
With only a Google Wallet plugin, .pkpass exports are refused. The customer pages show an error message, the SDK HTTP API answers 403 not_exportable, and the REST API v2 answers 422. PDF downloads still work.
Google Wallet in custom applications
The SDK HTTP API and the REST API v2 do not offer a Google Wallet export yet. Applications built on them can offer the .pkpass and PDF downloads. Customers who need a Google Wallet pass use the customer web pages.
Exporting a transferred ticket
The hosted ticket page and the REST API V2 /me ticket export use the current holder. When transfers are enabled for the category, a customer who has accepted a transfer can export an eligible ticket there. The SDK HTTP API looks up exports among the customer's owned tickets. A holder can see a game in the SDK list and still receive 404 on the SDK export. SDK ticket exports
Configure the pass content
The wallet_export object on each ticket or subscription controls the pass content. You set it through the REST API, an integration such as Eventim, or the Wallet Export field on the record in the dashboard.
There are two versions:
- Version 1 (
versionmissing or1) is the original layout. The pass shows the title, the start and end date, and the metadata keys listed inadditional_attributes. - Version 2 (
version: 2) maps each area of the pass to a field you choose.
| Key | Version | Meaning |
|---|---|---|
qr_code | Both | Required. The code shown as a QR code, for example the entry code. It is also printed as text below the code on Google Wallet passes. |
version | Both | 2 for the field mapping, 1 or missing for the original layout. |
additional_attributes | 1 | Metadata keys whose label and value the pass shows. The record's metadata must contain these keys. |
further_information | Both | Text for the back of the pass and the PDF. |
style | 2 | generic (default), eventTicket or storeCard. See Choose a style. |
logo_text | 2 | The name shown at the top of the pass. Without it, the brand's display name is used. |
fields | 2 | What each area shows: header (list), primary (one source), secondary (list) and auxiliary (list). |
A field source is either a string prefix.field or an object with value and an optional format (a strftime pattern for dates) and label:
| Prefix | Reads |
|---|---|
ticketable | A field of the ticket or subscription, such as title, text, reference, starts_at, ends_at or venue. |
metadata | A key of the record's metadata, using its stored label and value. |
user | A profile field of the customer, such as first_name. |
user_custom_attribute | A custom attribute of the customer, by its name. |
Sources without a value are left out. A pass therefore never shows an empty label.
{
"version": 2,
"qr_code": "synthetic-example-code",
"style": "eventTicket",
"logo_text": "Example Club",
"further_information": "Present this pass at the entrance.",
"fields": {
"header": ["ticketable.venue"],
"primary": "ticketable.title",
"secondary": [
"user.first_name",
"user.last_name",
{ "value": "ticketable.starts_at", "format": "%d.%m.%Y %H:%M", "label": "Kick-off" }
],
"auxiliary": ["metadata.seat"]
}
}Dates are shown in the brand's time zone. Labels use the customer's language for the brand.
Choose a style
style | Apple Wallet | Google Wallet |
|---|---|---|
generic or missing | Standard layout with the logo or thumbnail | Generic pass |
eventTicket | Full background image from Wallet export background | Event ticket |
storeCard | Strip banner from Wallet export background, otherwise the category's Background image | Loyalty card |
A Google Wallet pass keeps the type it was first saved with. If you change style later, existing Google passes keep their old type. Only passes saved afterwards use the new type.
Area limits
Apple Wallet shows up to three header fields. Google Wallet shows three rows of three fields on the card: the header, secondary and auxiliary fields. Further secondary and auxiliary fields appear in the pass details. Google Wallet shows at most 3 header, 10 secondary and 10 auxiliary fields.
Images and colours
Set images and colours on the category, in the Wallet Pass section. See Wallet Pass settings for the upload limits.
| Category setting | Apple Wallet | Google Wallet |
|---|---|---|
| Logo | Logo or thumbnail, depending on Logo position. Converted to PNG. | Round logo. Scaled into a padded square so Google's circular crop keeps a margin. |
| Wallet export background | Background for eventTicket, strip for storeCard | Not used |
| Wallet export hero image | Not used | Banner across the pass. Without it, the pass has no banner. |
| Background colour | Pass background | Pass background. Without it, Google uses the main colour of the banner or logo. |
| Foreground colour, Label colour | Text colours | Not used |
Updates and expiry
Saved passes follow their ticket or subscription:
- Apple Wallet: when the record changes, Unidy notifies every device that registered the pass, and Apple Wallet downloads the new version in the background. Changes to the category or to customer data do not reach passes that are already saved.
- Google Wallet: when the record, the category's colour or images, or a customer field shown on the pass changes, Unidy updates the pass at Google. Google updates the phone in the background.
An inactive record shows as expired. On Google Wallet, a passive ticket shows as inactive, while a passive subscription stays active. Deleting a ticket or subscription switches its Google Wallet pass off. Google passes cannot be deleted from a phone remotely.
Other wallet apps that import a .pkpass file, for example on Android, may not receive updates. The customer then downloads the pass again.
Troubleshooting
| Symptom | Next check |
|---|---|
| No wallet button | Check the plugin, Enable wallet export on the category and the record's qr_code. The record's exportable_to_wallet must be true. |
| Only the Google badge is missing | Check that the brand's Google Wallet plugin is enabled. |
| Enable wallet export cannot be switched on | The brand has no Apple Wallet or Google Wallet plugin. |
| A Google pass shows "[TEST ONLY]" | The issuer is still in demo mode. Request publishing access in the Google Pay & Wallet Console. |
| A Google pass has no banner | The category has no Wallet export hero image. |
| A saved Google pass still shows an old type | The pass keeps its first type. See Choose a style. |
A .pkpass download fails on a Google-only brand | Expected. Without an Apple Wallet plugin, .pkpass exports are refused. |