This article provides you with detailed information on obtaining Google-related artifacts in your Android mobile environment that are prerequisites for Mobile Pass generation. You can find further information in Google documentation.
1. Signing up for a Google Wallet API Issuer account
A Google Wallet API Issuer account is necessary to create and distribute Mobile passes for the Google Wallet.
- Sign up for Google Pay and Wallet Console to get your issuer account.
- 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.
- Submit the request.
The approval of your request might take up to a few business days depending on Google response time.
2. Enabling the Google Wallet API
- Sign into the Google Cloud Platform.
- Enable the Google Wallet API for your existing Google Cloud Platform project.
- In case you do not have any, create a new Google Cloud Platform project. - Enable the Google Wallet API.
3. Creating a service account and an account key
To be able to call the Google Wallet API you need to create the following:
- Issuer ID: The Issuer ID is the identity of your Mobile Pass. It is visible only once you have created your Mobile Pass. The Issuer ID is required to complete the configuration of the Mobile Wallet in the Emarsys Platform.
- Service account: It is the identity that calls the Google Wallet API.
- Service account key: It contains a private key that identifies your application as the service account.
The service account key is highly sensitive, so keep it confidential. If the service account key is not secure, a third party can use the service account key to make API calls to the API on your behalf. If the service account key is compromised, revoke the existing service account key immediately and update your application to use the new service account key.
3.a Creating a Mobile Pass with an Issuer ID
- Create a Mobile Pass in the Google Wallet API section.
- Click the Build your first Pass button.
- Save your Issuer ID required for the Mobile Wallet configuration.
3.b Creating a service account
-
Create a service account in the Google Cloud Console, providing the following details:
- Service account name. For example:
Wallet Web Client
- Service account ID. For example:
my-service-account
- Service account name. For example:
- Click CREATE AND CONTINUE.
- Click DONE.
3.c Creating a service account key
- Select your service account.
For example:my-service-account@my-project-id.iam.gserviceaccount.com
- Click the KEYS menu item at the top of the page.
- Click ADD KEY and Create new key.
- Select key type JSON.
- Click CREATE to create and download the service account key.
To avoid inconvenience, make sure that the Key expiration date of the key is quite well ahead in the future.
4. Authorizing the service account
You must authorize the service account in order to call the Google Wallet 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.
- Click Invite a user.
- Add the service account’s email address.
For example:my-service-account@my-project-id.iam.gserviceaccount.com
- Select Developer for Access level.
- Click Invite.