Add links to your Loyalty card

  • There are four ways to add links to a loyalty card, including using LoyaltyClass.LinksModuleData, LoyaltyObject.LinksModuleData, LoyaltyObject.appLinkData, and LoyaltyClass.appLinkData.

  • App linking allows you to direct users to your branded experiences (app or website) from Google Wallet passes, with links appearing at the bottom of the pass.

  • The appLinkData field can be used to set the URI or Package name of your app or website for a given loyalty card.

  • The displayText field within appLinkData is limited to 30 characters and is used to display a call-to-action on the pass.

  • appLinkData supports linking to Android apps using package names or Play Store URLs and websites using URIs.

There are four ways to add links to a loyalty card.

  • Use LoyaltyClass.LinksModuleData to add links to all loyalty cards that are associated with the LoyaltyClass.
  • Use LoyaltyObject.LinksModuleData to add a link to a specific loyalty card LoyaltyObject.
  • Use LoyaltyObject.appLinkData to place an app link at the bottom of that particular Pass.
  • Use LoyaltyClass.appLinkData to place an app link at the bottom of all the passes of that class.

One benefit of app linking is that it empowers your call-to-action to navigate users to your branded experiences from Google Wallet. Links with this feature appear at the bottom of the Pass.

Feature example

Issuer Name Applink Data Example
Issuer

For a given loyalty card, set the field LoyaltyObject.appLinkData to the URI or Package name of your app or website.

See the format and context of the appLinkData field in the following source code: The displayText field is limited to 30 characters.

  {
    "id": string,
    "classId": string,
    …
    …
    …
    "appLinkData": {
      "androidAppLinkInfo": {
        "appTarget": {
          "packageName": "com.google.android.gm",
        }
      },
      "webAppLinkInfo": {
        "appTarget": {
           "targetUri": {
              "uri": "https://mail.google.com/mail/",
              "description": "Web link for Gmail"
           }
        }
      }
      "displayText": {
        "defaultValue": {
           "value": "Our awesome app!"
        }
      }
    }
  }
For posterity the following implementation will also work.
{
  "id": string,
  "classId": string,
  …
  …
  …
  "appLinkData": {
    "androidAppLinkInfo": {
      "appTarget": {
        "targetUri": {
          "uri": "https://play.google.com/store/apps/details?id=com.google.android.gm",
            "description": "Play store link for Gmail app"
        }
      }
    }
  }
}