Google Play integration guide

ChartMogul now supports Google Play billing library 5.0 and 6.0. Google Play sources added on or after October 10, 2023 support the new billing library. Google Play sources added prior to this date use the Google Play version. To have your Google Play source use the new billing library, contact support.
You’ll need to be an Admin in ChartMogul and the Account Owner in Google Play Developer Console to complete the following setup.

Google Play is one of ChartMogul’s billing system integrations, allowing you to import customer, subscription, and transaction data to generate subscription analytics and cash flow metrics. Read our launch announcement.

Learn more about getting started with importing data for Subscription Analytics.

ChartMogul offers two options for importing your Google Play data:

  1. Import my data using the Daily Sales Report (no development required) — ChartMogul imports your data from Google Play’s Daily Sales Reports. This option doesn’t require you to write any code, and it runs automatically after setup.
  2. I’ll send the payloads via the Payloads URL — ChartMogul provides you with a URL where you send new purchase tokens. We then import the data for each token via the Google Play Developer API. This option requires you to write code but allows you to bring in customer metadata. Read our developer tutorial on importing Google Play purchase payloads.

Each of our integration types has its advantages as well as limitations. You’ll need to decide which one fits the needs of your business. Learn more about our Google Play integration types.

Here's what we cover in this article:

Overview

The following table provides details on key aspects of how ChartMogul integrates with Google Play.

Customer import event

If you’re using the Daily Sales Report, ChartMogul imports customers when they start a free trial or when their first subscription payment is processed in Google Play.

If you’re using the Payloads URL, ChartMogul imports customers when they have a purchase token. Google Play creates a purchase token when customers have a record, such as an attempted or successful subscription payment.

Leads

If you’re using the Daily Sales Report, ChartMogul imports the lead_created_at date when customers start a free trial or when their first payment is processed in Google Play.

If you’re using the Payloads URL, you have the option to import the customer’s lead_created_at date. Learn more.

Free trials

If you’re using the Daily Sales Report, ChartMogul imports the trial_started_at date when customers start a free trial and their first payment is processed in Google Play.

If you’re using the Payloads URL, you have the option to import the customer’s trial_started_at date. Learn more.

Contacts

ChartMogul does not import contacts from Google Play. Learn more about adding contacts.

Custom attributes

ChartMogul does not import custom attributes from the Daily Sales Report. It is, however, possible for you to create and populate custom attributes manually. Learn more.

If you’re using the Payloads URL, ChartMogul imports customer metadata as custom attributes.

Historical data

Google Play only offers Daily Sales Reports starting February 1, 2012. ChartMogul imports historical transaction data from this date onwards.


If you’re using the Payloads URL, you’ll need to send your historical data to ChartMogul via URL. Additionally, the Google Developer API doesn’t allow ChartMogul to retrieve in-app subscriptions that have remained expired for longer than 60 days. As a result, we’re not able to report on these subscriptions. Please contact support if you’d like to import historical data that includes such subscriptions into ChartMogul.

Paused subscriptions

ChartMogul does not offer native support for paused subscriptions.

When a subscription is paused using the Daily Sales Report, the subscription is canceled in ChartMogul at the end of its current service period, and a new subscription is created once it resumes.

When a subscription is paused using the Payloads URL, it is classified as Past due at the end of its current service period and continues to contribute to Monthly Recurring Revenue (MRR) while paused.

Reviewing subscription data in-app

Once imported, ChartMogul gives you complete visibility into your data as it exists in our platform through a series of data tables. To view these tables, navigate to Settings & Data > Sources, then select the source you want to view. Learn more about the data stored in each table and table column or export it to CSV.

Tax handling

If you’re using the Daily Sales Report, the report lists taxes separately and ChartMogul excludes taxes from Monthly Recurring Revenue (MRR).

If you’re using the Payloads URL, purchase tokens do not report taxes separately. As a result, Monthly Recurring Revenue (MRR) includes taxes.

Automated tags ChartMogul does not add any automated tags to customers. Instead, learn how to add tags in-app or using our API.
Subscriptions with multiple components Not currently supported. Learn more.
Update frequency ChartMogul imports subscription-related data from Google Play once per day. Learn more.
Maintained by This integration is built and maintained by ChartMogul. Contact our support team for assistance.

Data Settings

The following table provides details on how ChartMogul’s data settings work with your billing system.

Smart Activity Classification Fully supported. Learn more.
Handling Past-due Subscriptions

If you’ve configured grace periods in your Google Play account, this impacts the Handling Past-due Subscriptions setting.

If you’re using the Daily Sales report, ChartMogul includes the number of days in the grace period before auto-churning a subscription. For example, a customer is subscribed to a plan with a 14 day grace period and a service period from January 1 – February 1. ChartMogul waits for a renewal transaction between February 1 – February 14. If a renewal transaction is not received during the grace period, ChartMogul auto-churns the subscription on February 15.

If you’re using the Payloads URL, ChartMogul does not offer support for grace periods in Google Play. ChartMogul continues to classify a subscription as Cancelled when payment or cancellation tokens are imported after ChartMogul has auto-churned the subscription.

Churn Recognition

If you’re using the Daily Sales Report, ChartMogul only recognizes churn at the end of the service period.

If you’re using the Payloads URL, this setting is fully supported. Learn more.

Free Customer Handling Supported for ChartMogul accounts opened after August 17, 2022. Learn more.
Refund Handling ChartMogul does not deduct refunded transactions from Monthly Recurring Revenue (MRR).
Transaction Fee Handling ChartMogul allows you to include or exclude transaction fees when calculating metrics. Learn more.

How this integration works

There are also several additional details you should understand and consider when using Google Play with ChartMogul.

Detail Impact

ChartMogul imports subscription-related data once every 24 hours.

ChartMogul does not import data at the same time each day. Therefore, data for a given Google Play source may be out-of-date by as much as 24 hours.

When ChartMogul generates an MRR movement 12 hours or more after the activity occurs in Google Play, it is not considered real-time and does not trigger a real-time email, Slack notification or webhook. Such delays may cause ChartMogul to generate an MRR movement after a daily recap email or Slack notification is sent, therefore excluding the update.

ChartMogul only reports revenue for Google Play in-app subscriptions.

ChartMogul does not report revenue for Google Play one-time purchases.

ChartMogul does not support consumable products.

ChartMogul reports customers who only purchase in-app consumables as subscribers.

Google Play does not expose order transaction dates.

ChartMogul reports the subscription start date as the transaction date.

Google Play’s API does not expose introductory prices.

ChartMogul calculates MRR using the list price when customers purchase a subscription at the introductory price.

Further, there are additional details when using the Payloads URL with ChartMogul.

Detail Impact

Google Play does not report when a transaction amount is prorated.

If you offer prorated billing, ChartMogul reports the list price as the transaction amount.

ChartMogul does not offer support for grace periods in Google Play.

When configuring the Handling Past-due Subscriptions setting, include the number of days in the grace period so ChartMogul accurately classifies subscriptions as Cancelled.

For example, your grace period in Google Play is 20 days, and you’ve configured the Handling Past-due Subscriptions setting to automatically churn subscriptions which are 14 days past due. When a customer does not resolve their payment issue within 14 days of the grace period, ChartMogul classifies the subscription as Cancelled. The subscription continues to be classified as Cancelled in ChartMogul even when the customer resolves their payment issue in Google Play on day 15-20 of the grace period.

Taxes in Google Play are inclusive or exclusive, depending on the location of the transaction.

Google doesn't expose information on the amount of tax in a transaction. Therefore, in regions with tax inclusive pricing, e.g., the United Kingdom, Monthly Recurring Revenue (MRR) includes taxes.

The Google Play Developer API does not provide historical data for grace periods or account hold periods.

ChartMogul uses current data for grace periods and account hold periods to calculate transaction fees and MRR.

Before you begin

  • Review your data settings to ensure ChartMogul calculates metrics and analytics based on the needs of your business. Adjusting these settings after importing data will require you to manually re-sync data.
  • Log in to the Google Play account you’d like to connect to ChartMogul. If you have multiple Google Play apps, you’ll need to add each app (package name) as a separate source in ChartMogul.
  • Decide if you’d like ChartMogul to include or exclude transaction fees when calculating MRR and cash flow metrics using the Transaction fee handling setting.

Source configuration

Each Google Play source in ChartMogul consists of the following configuration elements:

  • Package name — a unique name that identifies your app on the device, in Google Play Store, and in supported third-party Android stores.
  • Service Account JSON Key — a key type that grants ChartMogul API access to your Google Play account.
  • Google Storage Bucket — if you’re importing Google Play data using the Daily Sales Reports, ChartMogul uses the bucket ID to locate and download your reports.
  • Select integration type — an option to choose the method for importing your Google Play data. This setting can be modified at any time. Read more about each integration type.
  • Transaction fee handling — option to include or exclude transaction fees when calculating MRR and cash flow metrics. Learn more about Transaction fee handling.
  • Name — a unique name that enables you to identify where the data is coming from.

To update your source's configuration:

  1. Within ChartMogul, navigate to Settings & Data > Sources.
  2. Find your Google Play source and click the Settings  icon.
  3. Make any required changes and click Update.

Connecting Google Play to ChartMogul

Step 1 — Select an integration type

ChartMogul offers two methods to import your Google Play data: using Daily Sales Reports or via the Payloads URL. Read more about each integration type and select the one that fits the needs of your business.

alt

Step 2  — Retrieve your app’s package name

You’ll need your app’s package name when adding Google Play as a source in ChartMogul.

Locate your Google Play app’s package name by navigating to your Google Play console and viewing your list of published apps. The package name is listed below the name of the app, e.g., com.pecode.purchaseappdemo.

Screenshot of the Google Play console with a list of published apps.

Step 3 — Set up an API access client using a service account and download a JSON Key

  1. Open Google Developers Console.
  2. Use the drop-down to select a project. To create a new project, click Create project.
  3. Navigate to APIs and Services > Enabled APIs and services and make sure that the required APIs and services are enabled:
    • Google Play Android Developer API
    • Cloud Storage
    • Cloud Storage API
    • Google Cloud Storage JSON API
    • Google Play Developer Reporting API
  4. Next, create a service account by navigating to IAM and Admin > Service Accounts.
  5. Click + Create Service Account.
  6. Enter a name for the service account, e.g., ChartMogul, in the Service account name field.
  7. Click Create and Continue.
  8. Then, within Grant this service account access to the project select Owner as the role. Click Continue.
  9. Click Done.
  10. Copy the email address listed. For example, accountName@project.iam.gserviceaccount.com. You’ll use this to add the service account on Google Play Console.

Once Google has created the account, find it in the Service Accounts table, click the vertical ellipsis Actions icon, and select Manage keys.

Screenshot of the Actions dropdown with the Manage keys option highlighted.

Then, create a private key:

  1. Navigate to Add Key > Create new key.
  2. Select JSON as the Key type.
  3. Finally, click Create.

 Screenshot of the Create private key for ‘demo’ dialog wth the JSON key type selected. The Create button is highlighted.

Google generates a JSON file that your browser should download automatically. You’ll use this file when adding Google Play as a source in ChartMogul.

Step 4 — Add the service account on Google Play Console

  1. Open Google Play Console.
  2. Click Users and Permissions and then Invite new users.
  3. Enter the email address associated with your service account.
  4. Within the App permissions tab, click the app that you want to access and select View financial data and Manage orders and subscriptions.
    Screenshot of the App permissions list with two elements selected: View financial data and Manage orders and subscriptions.
  5. Click Apply to confirm.
  6. Then navigate to the Account permissions tab and select View app information and download bulk reports (read-only), View financial data, orders and cancellation survey responses, and Manage orders and subscriptions.
    Screenshot of the Account permissions list with three elements highlighted. Element one:View app information and download bulk reports (read-only). Element two: View financial data, orders and cancellation survey responses. Element three: Manage orders and subscriptions.
  7. Click Add user. Your service account will be added to your Google Play account.

Google Play may take up to 36 hours to update the permissions for new accounts.

Step 5 — Retrieve your Google Play Storage Bucket ID

Google Play generates daily reports and accumulates the reports in monthly CSV files. These files are stored in a private Google Cloud Storage Bucket. ChartMogul uses the ID from this bucket to locate and download your reports.

To retrieve your Google Storage Bucket ID:

  1. Go to your Google Play console and select Download Reports > Financial.
    Screenshot of the Download reports drop-down with the Financial option highlighted.
  2. Locate the Estimated sales reports and click Copy Cloud Storage URI. This copies the URI that contains your Google Play Bucket ID to your clipboard. For example: gs://pubsite_prod_rev_01234501234567890123/reviews.
    Screenshot of the Estimated sales reports section with the Copy Cloud Storage URI option highlighted.
  3. Extract your Google Play Bucket ID from the Direct reports URI by removing gs:// and /reviews, e.g., pubsite_prod_rev_01234501234567890123.

Be sure to note your Google Storage Bucket ID as you’ll need it in the next step.

Step 6 — Add Google Play as a source

Next, add Google Play as a source in ChartMogul:

  1. Within ChartMogul, navigate to Settings & Data > Sources
  2. Click Add Source.
  3. Make sure that the Subscription data tab is selected and click Google Play.
    Screenshot of the Select a source type dialog showing the locations of the Subscription data tab and the Google Play source.
  4. Enter a unique name for your source in the Name field and click Next.
  5. Package Name: The name of the package you retrieved in Step 2.
  6. Service Account JSON Key: Upload the JSON file you downloaded in Step 3.
  7. Google Storage Bucket: If you’re importing data using the Daily Sales Report, enter the Google Storage Bucket ID you retrieved in Step 4.
  8. Select the method you’ll use to import your Google Play data with Select integration type.
  9. Decide whether ChartMogul should deduct transaction fees from MRR and cash flow metrics with Transaction fee handling.
  10. Finally, click Connect.

Once connected, complete setup depending on the method you’ve selected to import your Google Play data:

  • If you select Import my data using the daily Sales report, ChartMogul automatically imports all data once you’ve successfully connected it to Google Play. No further action is needed to import historical data.
  • If you select I'll send the payloads via the payloads URL, ChartMogul does not automatically import Google Play purchases. You’ll need to build an integration using our API to import historical purchases and keep ChartMogul up-to-date with new purchases. Once connected, ChartMogul generates a Payloads URL, a unique endpoint for your Google Play source. Use this URL to build your integration. Follow our developer tutorial for importing Google Play purchase payloads.
    Screenshot of Google Play source configuration options with the Select integration type option and Payloads URL field highlighted.

Manually re-syncing data

If you alter one of the settings in your source or a data setting requiring a re-sync, you will need to re-import your data to make the behavior consistent historically and going forward.

Re-syncing your Google Play source will not impact changes you’ve made in ChartMogul such as lead and trial data, edited customer details, edited MRR, or merged customers.

Connected subscriptions are not preserved after a re-sync.

Here’s how to manually re-sync data when needed:

  1. Within ChartMogul, navigate to Settings & Data > Sources.
  2. Find your Google Play source and click the Settings  icon.
  3. Click Re-sync Data.

ChartMogul will start re-importing your data and let you know where it’s at with a progress bar.

Deleting Google Play as a source

Deleting a source is permanent and cannot be undone

Before deleting a source, please note the following:

  • All data from this source will be immediately and irrevocably removed from ChartMogul.
  • All MRR adjustments and connected subscriptions will be lost.
  • If this source contains a merged customer, the customer record and data from the non-deleted source will remain in ChartMogul.

To delete a Google Play source, navigate to Settings & Data > Sources. Find the source in the list and click the Settings  icon. From there, click Delete This Source.

Next Steps

Was this article helpful?

We’re sorry to hear that. Would you like to share more feedback?


Thanks for your feedback!