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 you complete your Business profile, navigate to the Google Wallet API page and click Request access. Indicate in the use case that you plan to use Google Wallet API for this implementation, complete the checklist, and submit the request.
2. Enable the Wallet API
- Sign into the Google Cloud Platform and enable the Google Wallet API for your GCP project.
- If you don’t already have a GCP project, create one.
- Enable the Google 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 identifies your application as the service account.
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
- 2. Click CREATE AND CONTINUE.
- 3. Click DONE.
Create a service account key:
- 1. Select your service account. For example: firstname.lastname@example.org.
- 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: email@example.com.
- 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
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.