Distributing Multiple Passes to a User

Badge supports distributing multiple digital passes to a user through two mechanisms: Linked Passes and Grouped Passes. These options provide flexibility depending on how you want the user to receive and organize multiple passes.

📘

Both mechanisms allow you to link or group passes across different pass templates, enabling a seamless multi-template distribution strategy.

Linked Passes

Linked Passes define a one-to-many relationship between a parent pass and one or more child passes. This is useful when there’s a logical hierarchy between passes (e.g., a primary access credential and associated sub-passes).

Recommendation: In most cases Linked Passes is the preferred approach.

Key Features

  • One-to-many relationship: One parent pass can link to multiple child passes.
  • No dual-role support: A pass cannot be both a parent and a child.
  • Automatic updates in Google Wallet: If the parent is already saved to the user’s wallet, any newly linked child passes are auto-added.

API Implementation

Use the userPassUpsert endpoint with the parentPassId field to link a pass to its parent.

POST /v0/rpc/userPassUpsert HTTP/1.1
Accept: application/json
Content-Type: application/json

{
  "passTemplateId":"3b97d658-b413-4c52-a45a-0d9e2d26da5a",
  "user":{
    "id":"user-123"
  },
  "pass":{
    "id":"pass-123",
    "parentPass":{
      "passTemplateId":"bea55a7a-7121-4063-986b-126d4e58e8de",
       "id":"pass-456"
    }
  }
}

This creates or updates a pass based on template_child_456, associates it with user_123, and links it to an existing parent pass identified by parent_pass_abc123.

➡ See User Pass Upsert Documentation for additional details.

Grouped Passes

Grouped Passes enable you to bundle a collection of passes into a downloadable group. There’s no hierarchical structure—just a convenient download experience for the user.

Key Features

  • Group passes together: Bundle any number of passes.
  • Cross-template support: Group can include passes from different templates.
  • User-friendly download: One link gives access to the entire set.

API Implementation

Use the passGroupsCreate endpoint to create a group and generate a download URL.

POST /v0/passGroups HTTP/1.1
Accept: application/json
Content-Type: application/json

{
  "passes": [
    {
      "id":"pass-123",
      "templateId":"3b97d658-b413-4c52-a45a-0d9e2d26da5a"
    },
    {
      "id":"pass-456",
      "templateId":"bea55a7a-7121-4063-986b-126d4e58e8de"
    }
  ]
}

This request generates a group containing two passes from different templates. The API response includes a downloadUrl that a user can visit to get all the passes.

➡ See the Create Pass Group Documentation for additional details.


By using Linked Passes or Grouped Passes, you can efficiently distribute multiple passes to users—either as a connected experience or a unified bundle—depending on your application’s needs.