Unidy Docs

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 .pkpass file. 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:

  1. The brand has an Apple Wallet or Google Wallet plugin. Google Wallet must also be enabled.
  2. Enable wallet export is switched on for the ticket or subscription's category.
  3. The ticket or subscription has wallet_export data with a qr_code. Its exportable_to_wallet field is then true.

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 WalletGoogle Wallet
Delivery.pkpass download on the web, through the SDK HTTP API and the REST API v2Redirect to Google's save page, on the customer web pages only
Where the pass is storedIn the file on the deviceAt Google
Pass typesOne format. style chooses the image layout.style chooses the pass type: generic, event ticket or loyalty card
When the ticket or subscription changesThe device is notified and downloads the updated passUnidy sends the updated pass to Google
When category branding or customer data changesSaved passes are not updatedSaved passes are updated
ColoursBackground, foreground and label colourBackground colour only. Google picks the text colour.
End dateThe record's end timeTickets: end time plus the category's grace period, otherwise start time plus one day. Subscriptions: end time.
GroupingPasses are not groupedEvent tickets of the same category and start time are stacked as one event
Plugin state needed for exportThe plugin existsThe plugin is enabled
When the plugin is deletedSaved passes remain unchangedAfter 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:

BadgeShown when
Add to Apple WalletThe brand has an Apple Wallet plugin.
Add to Google WalletThe 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.
PDFAlways, 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 (version missing or 1) is the original layout. The pass shows the title, the start and end date, and the metadata keys listed in additional_attributes.
  • Version 2 (version: 2) maps each area of the pass to a field you choose.
KeyVersionMeaning
qr_codeBothRequired. 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.
versionBoth2 for the field mapping, 1 or missing for the original layout.
additional_attributes1Metadata keys whose label and value the pass shows. The record's metadata must contain these keys.
further_informationBothText for the back of the pass and the PDF.
style2generic (default), eventTicket or storeCard. See Choose a style.
logo_text2The name shown at the top of the pass. Without it, the brand's display name is used.
fields2What 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:

PrefixReads
ticketableA field of the ticket or subscription, such as title, text, reference, starts_at, ends_at or venue.
metadataA key of the record's metadata, using its stored label and value.
userA profile field of the customer, such as first_name.
user_custom_attributeA custom attribute of the customer, by its name.

Sources without a value are left out. A pass therefore never shows an empty label.

json
{
  "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

styleApple WalletGoogle Wallet
generic or missingStandard layout with the logo or thumbnailGeneric pass
eventTicketFull background image from Wallet export backgroundEvent ticket
storeCardStrip banner from Wallet export background, otherwise the category's Background imageLoyalty 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 settingApple WalletGoogle Wallet
LogoLogo 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 backgroundBackground for eventTicket, strip for storeCardNot used
Wallet export hero imageNot usedBanner across the pass. Without it, the pass has no banner.
Background colourPass backgroundPass background. Without it, Google uses the main colour of the banner or logo.
Foreground colour, Label colourText coloursNot 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

SymptomNext check
No wallet buttonCheck 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 missingCheck that the brand's Google Wallet plugin is enabled.
Enable wallet export cannot be switched onThe 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 bannerThe category has no Wallet export hero image.
A saved Google pass still shows an old typeThe pass keeps its first type. See Choose a style.
A .pkpass download fails on a Google-only brandExpected. Without an Apple Wallet plugin, .pkpass exports are refused.

Was this page helpful?