Before you use the Google Wallet API for an integration, complete the following steps:

1. Sign up for a Google Wallet API Issuer account

An Issuer account is necessary to create and distribute passes for Google Wallet. Sign up for Google Pay and Wallet Console to get your issuer account. After signing up, navigate to the Google Wallet API page and click Build your first pass. Once you accept the terms of service you can start creating a pass class.

After the above step you can also try out the Codelab.

2. Enable the Wallet API

3. Create a service account

A service account and a service account key are necessary to call the Google Wallet API. The service account is the identity that calls the Google Wallet API. The service account key contains a private key that your application uses to authenticate to the Google Wallet API.

Create a service account:

  • 1.Create a service account in the Google Cloud Console, providing the following details:
    • Service account name - example: Wallet Web Client
    • Service account ID - example: my-service-account
  • 3. Click DONE.

Create a service account key:

  • 1. Select your service account. For example:
  • 2. Click on the KEYS menu item at the top of the page.
  • 3. Click ADD KEY and Create new key.
  • 4. Select key type JSON.
  • 5. Click CREATE to create and download the service account key.

4. Authorize the service account

You must authorize the service account in order to call the API. To authorize it, grant the service account access to manage your Issuer Account.

  • Visit the Users page in the Google Pay and Wallet Console.
  • 1. Click Invite a user.
  • 2. Add the service account's email address. For example:
  • 3. Select Developer for Access level.
  • 4. Click Invite.

5. Create a class

Before you can create and add a GenericObject, you must create a GenericClass. This can be done using the Web API. For further information, please refer to the reference documentation for GenericClass, as well as the getting started guide for using the Web API.

Repeat the steps on this page if you require multiple Generic passes.

Refer to the Layout template for more information on how these attributes are represented on the pass.

After you successfully create a Generic class, proceed to Add passes to Google Wallet. Please note that we are still working on adding generic type to Google Pay and Wallet Console.