Auto Linked Passes

Background

The Auto Linked Passes feature lets you send additional passes to a user who already has your existing pass in their Google Wallet. You can also pre-link passes to a primary pass when a user saves the primary (main) pass. The Auto Linked Pass is grouped with the primary pass with a callout above the primary pass informing the user that a new pass has been linked. The following pass types are supported as primary or linked passes;

  • Event ticket
  • Boarding pass
  • Transit pass
  • Offer
  • Gift card
  • Loyalty pass
  • Generic pass
Auto Linked Pass Primary Example Auto Linked Pass Secondary Example
Primary pass with the callout that a new pass has been added New pass linked to the primary pass

Use Cases

You may have different use cases for linking passes to an existing pass. Some examples include:

  • Link an offer to an existing loyalty card.
  • Link a meal voucher to a boarding pass or event ticket.
  • Link a parking pass to an event ticket.

Some considerations when using Auto Linked Passes

  • The primary object and linked object must use the same issuerId.
  • There is a limit of 50 linked objects per primary object.
  • Pushing linked passes automatically is not guaranteed and considered best-effort. Users can opt out of receiving Auto Linked Passes. If the use case is critical and the user must receive the linked pass, we recommend communicating through another channel to ensure the user adds the pass.
  • Updates to the Google Wallet AUP include guidance on the use of Auto Linked Passes which must be adhered to.

Integration Steps

If you have already created a primary object you can skip step 1.

  1. Create an object of any pass type listed with the required parameters. This is the primary object.
  2. Create another object of any pass type listed. This is going to be the linked object.
  3. Either before or after the primary object is saved, update the primary object with the ID of the linked object in the linkedObjectIds parameter.

There is a minimum payload required to set the linkedObjectIds on a primary pass. The 3 required parameters include;

  1. ISSUERID.PRIMARY_OBJECT_ID
  2. ISSUERID.PRIMARY_CLASS_ID
  3. ISSUERID.LINKED_OBJECT_ID

Example JSON Request to add a linked object to a pass object

  …
  {
    "id": "ISSUERID.PASS_OBJECTID",
    "classId": "ISSUERID.PASS_CLASSID",
    "barcode": {
      "type": "qrCode",
      "value": "QR code"
    },
    "linkedObjectIds": {"ISSUERID.LINKED_PASS_OBJECTID"}
  }
  …

Example JSON Response after linking an object to a pass object

  …
  "state": "active",
  "linkedObjectIds": {
    "ISSUERID.LINKED_PASS_OBJECTID"
  }
  …

Expected behavior

After receiving a successful response, devices with the pass you updated should receive the linked pass. This linked pass will be grouped together with the primary pass. Users can see the linked pass by swiping right.

Exception handling

Potential errors may happen with incorrect use of the API which can include;

Message Reason
Primary object and linked object don't share the same issuer ID. You cannot attach a linked object to another issuer's object.
Primary object and linked object refer to the same object. You cannot attach the same object as the linkedObject.
Linked object does not exist. The linked object should already be inserted into the Wallet API.
Linked object already has another linked object. Cannot add nested linked objects. Linked objects cannot have another linked object.
Object is already linked to another object. Cannot add nested linked objects. Primary object cannot be a linked object by itself.
Cannot add any more linked objects, limit exceeded. The limit of 50 linked passes has been reached for the primary pass.