AI-generated Key Takeaways
-
There are four ways to add links to a gift card: using
GiftCardClass.LinksModuleDatafor all cards in a class,GiftCardObject.LinksModuleDatafor a specific card,GiftCardObject.appLinkDatafor an app link at the bottom of a specific pass, andGiftCardClass.appLinkDatafor an app link at the bottom of all passes in a class. -
App linking enables call-to-actions that navigate users to branded experiences from Google Wallet, appearing at the bottom of the pass.
-
To set an app link, configure the
GiftCardObject.appLinkDatafield with the URI or Package name of your app or website for a given gift card. -
The
appLinkDatafield allows specifyingandroidAppLinkInfofor Android andwebAppLinkInfofor web links, along withdisplayText(limited to 30 characters) for the link's visible label. -
An alternative implementation for
appLinkDatautilizestargetUriwithinandroidAppLinkInfoto link directly to the app's Play Store listing.
There are four ways to add links to a gift card.
- Use
GiftCardClass.LinksModuleDatato add links to all gift cards that are associated with theGiftCardClass. - Use
GiftCardObject.LinksModuleDatato add a link to a specific gift cardGiftCardObject. - Use
GiftCardObject.appLinkDatato place an app link at the bottom of that particular Pass. - Use
GiftCardClass.appLinkDatato 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 |
Set the app link on your Google Wallet pass
For a given gift card, set the field GiftCardObject.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!"
}
}
}
}
{
"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"
}
}
}
}
}