Skip to content

Integration

Google Play + Bastle

What syncs from Google Play, what it makes possible, and how to connect it.

Beta

This connector works and can be connected today, with edge cases still being closed. Check the first month against the source before you rely on it.

What does the Google Play integration do?

The Google Play integration tracks Play Billing subscription revenue through the Android Publisher API, authenticated with a service account, and receives Real-time Developer Notifications delivered as Cloud Pub/Sub push messages. Subscription products and base plans become Bastle plans, and regional prices are converted to integer cents rather than parsed as decimals.

What syncs

Bastle reads the following from Google Play and normalises it into the same entities every other source produces. Ingestion is read-only: nothing is created, changed or cancelled upstream.

  • Subscription products and their base plans → plans, with ISO-8601 billing periods mapped to interval and interval count.
  • Regional prices, converted to integer cents from Google's units-and-nanos representation.
  • Subscribers and subscription state from purchase records.
  • Purchases → charges, and refunds and revocations → refunds.
  • Lifecycle notifications: renewal, cancellation, grace period, hold, restart and price change.
  • Cadence: notification-driven via Pub/Sub push. Historical import run manually today.

Once connected

What Google Play data unlocks

Connecting a source is not the point; what you can answer afterwards is. These are the questions this data makes answerable.

Play revenue in subscription-metric shape

The Play Console reports installs and earnings. Bastle produces MRR, churn, cohort retention and expansion on the same definitions used for web and iOS revenue.

Base plans modelled as plans

A Play subscription can carry several base plans with different billing periods. Each maps to its own Bastle plan, so a monthly and an annual base plan on the same product are not averaged into one.

Exact prices

Google reports money as whole units plus nanos. Converting that to integer cents directly avoids the floating-point drift that shows up as cent-level disagreement across a large book.

Holds and grace periods visible

Account hold and grace period are Play's failed-payment states. They arrive as events, so a subscriber whose card failed is not silently counted as active.

Setup

Connecting Google Play

The whole flow, start to first chart. No implementation call and no data engineer.

  1. Create a service account in Google CloudEnable the Android Publisher API for its project and download the JSON key. Bastle uses the client email and private key for the server-to-server auth flow — no OAuth consent screen is involved.
  2. Grant it access in the Play ConsoleUsers and permissions → invite the service account email with financial data view access. Without this the API returns nothing useful.
  3. Connect Play in Settings → IntegrationsProvide the package name, service account email and private key.
  4. Route Real-time Developer Notifications to BastleConfigure a Pub/Sub topic in the Play Console with a push subscription targeting /api/webhooks/google-play. Bastle verifies the OIDC token on each push — signature, issuer and expiry always, and the audience when you configure one.

Setup is the hard part

Play is the most involved connector to configure, and pretending otherwise would waste your afternoon. Three separate consoles are involved: Google Cloud for the service account and the Pub/Sub topic, the Play Console for permissions and the notification topic, and Bastle for the credentials. None of it is difficult, but every step is somewhere different, and the failure mode of a missing permission is an API that returns success with empty data.

Prices, exactly

Google represents money as whole units plus nanos — billionths of a unit. Converting through a floating-point number introduces error that compounds across thousands of records into a visible discrepancy. Bastle converts to integer cents arithmetically and keeps it integral from there.

Notification verification

Pub/Sub push requests carry an OIDC token. Bastle always verifies its signature, issuer and expiry. It additionally verifies the audience when one is configured, which is worth doing — an audience check is what stops a token minted for another service being replayed at your endpoint.

What "beta" means here

The connector is written and the inbound webhook route verifies signatures and writes normalised rows, so a connected account keeps up with changes as they happen. What is not self-serve yet is the historical backfill: the code that walks your provider's API from the beginning exists in the connector, but the scheduled runner that triggers it is still a stub, so first-time imports are run by hand with us. Expect to email someone once during setup, and expect that to stop being true.

Bastle is free while in beta, connectors included. There is no tier that unlocks a provider.

Related

Other sources

Companies billing through Google Play usually have at least one of these in the stack too.

Google Play and Bastle: common questions

What access does the service account need?

The Android Publisher API enabled in its Google Cloud project, and an invitation in the Play Console with financial data view access. Missing the Play Console grant is the most common setup problem, and it presents as successful API calls returning no data.

Do I have to set up Pub/Sub?

For real-time updates, yes. Play delivers Real-time Developer Notifications through a Pub/Sub topic with a push subscription pointed at Bastle. Without it the data is only as current as the last manual import.

How are multiple base plans handled?

Each base plan on a subscription product becomes its own Bastle plan, keyed on the product and base plan pair. A monthly and an annual base plan therefore keep their own pricing and interval rather than being blended into one average.

Can I track Play and App Store revenue together?

Yes. Both are sources in the same workspace alongside any web billing, so a single MRR figure covers every storefront on one set of definitions.

Connect Google Play and see your own history.

Bastle backfills what Google Play will serve, then keeps current over webhooks — usually a couple of minutes before the first real chart. Free while in beta, no card required.