Setup: Google Cloud Pub/Sub

Prev Next

Preliminary Remarks

In order for plenigo to be able to communicate with Google services, authentication information from Google must be stored in the plenigo backend. The process for configuring this authentication information in Google services is described in this article.

Helpful additional articles:

  • For an introduction to the configuration, we explain the most important objects in our glossary article.

  • For a better overview of the necessary steps, the Google setup checklist can be helpful.    

The following accesses are necessary:

  1. Google Cloud Platform (GCP) account: A Google Cloud account is required to use Google Pub/Sub. If an account does not yet exist, it can be registered.

  2. Google Play Console account: There should be an app in which in-app purchases are to be implemented. This may require an account for the Google Play Console.

  3. plenigo account: An active plenigo account is required to receive the data for in-app purchases. The functions are available on both the stage and live systems from plenigo.

  4. Activated billing: Billing must be activated for the Google Cloud project.


What is Google Pub/Sub?

Google Pub/Sub can be used to send information about in-app purchase events to additional recipients outside the Google systems. For example, when a customer makes a purchase, the corresponding app publishes a message in a topic. plenigo or other subscribed services receive this message and can react to it, e.g. update the user account, link a subscription or assign access rights.  


Configuration of Pub/Sub in the Goolge Cloud Console

The steps required to configure the Pub/Sub functions in the Google Cloud Console are described below. The official Google documentation can be found here.

Create Google Cloud project for the desired app(s)

  • Login to the Google Cloud Console

  • On the Cloud start page, click on the project dropdown in the top bar

  • Click on the "New project" button

  • Assignment of name and classification in organizational structure

  • The project is saved with the "Create" button

More information in the Google doc on this topic

Create topic within the project

  • Open the Pub/Sub section in the Google Cloud Console

  • Open the menu item Topics within Pub/Sub

  • Click the "Create topic" button in the header bar

  • Name the topic (e.g. "in-app purchases") in the "Id of topic" field

  • Deactivation of the "Add standard subscription" checkbox

  • Encryption: Select "Encryption key managed by Google"

  • The topic is saved with the "Create" button

More information in the Google doc on this topic  

Create a subscription within a theme

  • Open the menu item Subscriptions again in the Pub/Sub area

  • Click the "Create subscription" button in the header bar

  • Name the subscription and select the previously created topic as the source

  • Select delivery type: Push

  • Enter the endpoint URL: https://callbacks.plenigo.com/callbacks/v1.0/appStore/{companyId}/googleplaystore
    The Frisbii Media CompanyId can be viewed in the URL in the Merchant Backend in the desired client: Where can I find the CompanyID?

  • Subscription expiry date: never

  • All other options can be left in the default setting

More information in the Google doc on this topic  

Link Google service account to theme
To ensure the flow of information between Google Play and Google Pub/Sub, a Google Play service account must be assigned to the created theme.

  • Open the topic created in the previous step

  • Select the "Permissions" tab (1) in the area on the right and open the "Add main account" option (2)

  • In the next step, the Google Play service account "google-play-developer-notifications@system.gserviceaccount.com" is granted access to the selected theme. The service account is assigned the role "Pub/Sub-Publisher" (2).

  • Click the "Save" button to complete the link.

More information in the Google doc on this topic


Activation of the Google Play API

Once the Google Cloud project has been set up and has a theme and subscription, the Google Play Developer API must be activated for this project. The API is necessary to enable communication between Google Play and Google Cloud services.

This activates the Google Play Developer API: