Create a Google digital pass template

This guide will show you how to create an Apple digital pass template, which is required to format a Compact or Compact Semantic Credential as a Google digital pass.


You need the following in order to proceed with this tutorial:


Make the following request to create a Compact Credential Google digital pass template:

Copy to clipboard.
1POST https://YOUR_TENANT_URL/core/v2/credentials/compact/digitalpass/google/templates

You can make a similar request to a different endpoint to create a Compact Semantic Credential Google pass template:

Copy to clipboard.
1POST https://YOUR_TENANT_URL/core/v2/credentials/compact-semantic/digitalpass/google/templates

Request body

Copy to clipboard.
2    "template": {
3        "value": fs.createReadStream(""),
4        "options": {
5            "filename": "",
6            "contentType": null
7        }
8    },
9    "name": "example",
10    "issuerId": "xxxxx",
11    "serviceAccountClientEmail": "xxxxx",
12    "serviceAccountPrivateKey": "xxxxx"
  • template: Include your template files.

  • name: Insert a name to identify this Google digital pass template.

  • issuerId: Google Wallet Pass signer issuer ID. 

  • serviceAccountClientEmail: Email address of the Google Cloud Platform service account for accessing the Google Pay Passes API. 

  • serviceAccountPrivateKey: Private key PEM of the Google Cloud Platform service account.

Click here to find out more about how to grant access to your service account to call the Google Wallet API.


Copy to clipboard.
2    "id": "0793fade-bd27-46a8-8dfe-67c4d3e9cf09",
3    "name": "example",
4    "passType": "google",
5    "metadata": {
6        "issuerId": "xxxxx",
7        "serviceAccountClientEmail": "xxxxx",
8        "payPassId": "xxxxx"
9    }

Errors may occur in the following scenarios:

  • Unable to decompress the bundle.

  • template.json is missing from the bundle or malformed.

  • The bundle file exceeds the maximum size allowed.

To avoid potential impact on previously generated Google digital passes, updating an existing template will always create a new template in the Google Pay Business Console.