> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fusioncore.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Google and Apple Wallet

> Issue digital membership passes to Apple Wallet and Google Wallet directly from Salesforce.

## Overview

The **Google and Apple Wallet** accelerator lets staff issue, update, and delete digital membership, loyalty, or event passes to a member's phone wallet without leaving Salesforce. It's a wrapper around the third-party [PassKit.com](https://passkit.com) API — staff or an automated Flow trigger a pass action, and the package stores the resulting pass reference and "add to wallet" link on a `Pass Assignment` record.

A separate fusionCore-specific add-on layers on top of this base package to automatically issue or remove a pass when a membership is purchased or expires — check whether it's installed if you expect passes to be fully automatic.

This accelerator is not part of core fusionCore — you also need your own PassKit.com account.

## Prerequisites

* A PassKit.com account with your Program and Tier(s) already created, plus your API key and secret.
* Know whether your PassKit account is on the `pub1` or `pub2` server — you'll need to select the matching option during setup.

## How to Configure

<Steps>
  <Step title="Assign permission sets">
    Assign **Passes Setup** to staff who will configure and issue passes, and **Passes Viewer** to anyone who only needs to view them.
  </Step>

  <Step title="Store your PassKit credentials">
    Go to **Setup → Custom Metadata Types → PassKitDotComCredential → Manage Records → New**. Name the record **Default**, and set:

    * `uid__c` — your PassKit API key.
    * `Secret__c` — your PassKit secret.
    * `Endpoint__c` — `pub1` or `pub2`, matching your PassKit account.
  </Step>

  <Step title="Create a Pass Setup per pass type">
    For each pass you want to offer, create a `Pass_Setup__c` record with `Program_Id__c` and `Tier_Id__c` matching your PassKit configuration, choose a `Pass_Type__c` (Membership, Loyalty, or Event), and check `Active__c`.
  </Step>

  <Step title="Add wallet buttons and QR codes">
    Add the **Add to Google Wallet**, **Add to Apple Wallet**, and **Pass URL QR Code** Lightning components to the `Pass_Assignment__c` record page (or to a community page, for the wallet buttons).
  </Step>

  <Step title="Issue passes from a Flow (optional)">
    Use the **Add Member to Pass**, **Update Member Pass**, and **Delete Member Pass** invocable Flow actions (Flow category "Google Apple Pass") to issue or manage passes as part of your own automation, for example on membership purchase.
  </Step>
</Steps>

## Limitations and Common Pitfalls

<Warning>
  **Known issue — Pass URL always points to `pub2`.** The `Pass_URL__c` field on `Pass_Assignment__c` is built from a formula that always uses the `pub2` PassKit host, regardless of which `Endpoint__c` you configured. If your PassKit account is on `pub1`, the generated Pass URL may be incorrect. Confirm with PassKit support before relying on this field if you're on `pub1`.
</Warning>

* **Errors are stored on the record, not raised as an error.** If PassKit rejects a request, the `Pass_Assignment__c` record still saves — its `Status__c` is set to Error and the reason is written to `Error_Message__c`. A Flow that doesn't check this can proceed as if the pass succeeded. Always check the pass's status after issuing it.
* **Bulk deletion is asynchronous.** Deleting more than one pass at a time processes in the background — the records show "Processing Deletion" until the batch completes, rather than deleting immediately.
* **Only the member's name and email are sent to PassKit automatically.** Additional personalization needs custom configuration beyond the base setup.
* **Missing credentials fail hard.** If the `Default` Custom Metadata credential record doesn't exist (or is misconfigured), every pass action fails until it's created.
* **The fusionCore add-on only covers subscription memberships.** If your org has the fusionCore-specific add-on installed, it automatically issues a pass only for active subscription purchases tied to a product with an active Pass Setup — one-time purchases don't get an automatic pass.
