Skip to main content

Google Play

Setup Instructions

Google Play Store integration requires data from your application in Google Play Console. For this, a project on Google Cloud is necessary for authenticating and accessing your Google Play application backend, in order to send receipt validation requests. If you are offering subscriptions, enabling Real-time developer notifications (RTDN), which delivers updates about subscription states and expirations to the IAPGUARD backend in realtime, is required as well.

note

Note that the initial setup and configuration of your project in Google Cloud could take up to 24 hours for it to successfully establish a connection to the Google Play API. In the meantime receipt validation requests will still fail.

In the following screenshot, you can see the required fields we are going to fill out. Edit your Application to get started.

  • Bundle ID
  • License Key
  • Account ID

GooglePlay-Setup000


Bundle ID

The Bundle ID is displayed when editing your application in Google Play Console.

  • Navigate to All apps > Your App > Dashboard
  • Copy-paste the identifier below your app name into the IAPGUARD Dashboard as Bundle ID

GooglePlay-Setup010


Account ID

A service account in Google Cloud needs to be created with financial permissions that can access your order management for receipt validation.

  • Follow Google's documentation linked below on:
    • Creating a Google Cloud Project
    • Enabling the Google Play Developer API
    • Setting up a Service Account (skip the OAuth client part)
    • Inviting Service Account in Google Play Developer Console
    • Granting App Access and Financial Data permissions

Google Cloud - Getting Started

Please contact Support if you have issues with this process or require further assistance.

tip

If you do not want to wait 24 hours for Google to take over your changes and service account permissions, you can head to your app's In-App Products or Subscriptions section in the Google Play Developer Console and quickly Disable & Activate a product to force an update by Google.

After this step, your project settings should look like this:


GooglePlay-Setup020


GooglePlay-Setup030


GooglePlay-Setup040


GooglePlay-Setup050


GooglePlay-Setup051


  • Copy-paste the Service Account email into the IAPGUARD Dashboard as Account ID

License Key

Please note that this key can only be downloaded once, so make sure to save it in a secure location.

  • On your Service Account, navigate to Actions > Manage Keys
  • Add a new JSON key
  • Open the downloaded *.json file
  • Copy-paste the value for private_key into the IAPGUARD Dashboard as License Key (without quotation marks)

GooglePlay-Setup060


GooglePlay-Setup070


Again, note that the full key should be copied, including the -----BEGIN... -----END... parts and all line breaks inbetween.

Server Notifications

caution

This step is required when offering subscriptions.

note

Google Real-time developer notifications (RTDN) using the Pub/Sub service are not completely free, however there is a free contingent of 10 TiB per month. This should be sufficient to process millions of messages every month. It is unlikely that your applications receives that many messages, except if you have hundreds of thousands in-app purchases as well. The Server URL is the same for Production and Sandbox.

  • Follow Google's documentation linked below on:
    • Enabling the Pub/Sub API for your project
    • Creating a topic and subscription
    • Adding Google's Service Account to the topic
    • Adding the topic to your Google Play Console application

Google Developers - Configure Real-time developer notifications

Please contact Support if you have issues with this process or require further assistance.

After this step, your project settings should look like this:


GooglePlay-Setup080


GooglePlay-Setup090


  • Edit the Subscription and change the Delivery type to Push
  • In the Endpoint URL input field, enter the URL below
  • Change the Expiration period to Never expire
  • Change the Retry policy to Retry after exponential backoff delay
  • Save by clicking on Update
https://api.iapguard.com/v1/webhook/{YourAppID}/google

Replace {YourAppID} with the application ID that is displayed when editing your IAPGUARD application.


GooglePlay-Setup100