Guide · For developers

Google Play subscription tracking for creator programs

A Google Play affiliate program needs to identify the creator who brought a subscriber and verify the payments that earn commission. This guide explains how the Play Install Referrer, your app’s purchase identifier, real-time developer notifications and Google’s Developer API work together. Follow a creator’s link through the install, the first payment, renewals and refunds.

Updated 18 October 2026 · 6 min read · By the AppCut team

Setting up your app’s affiliate program? See the Google Play setup for AppCut’s payment connection and Android attribution requirements. The guide below explains how the underlying tracking works.

The four pieces

PieceWhat it doesWhat it gives a creator program
Play Install ReferrerYour app reads the referrer of the Play Store link that led to the installWhich creator’s link someone tapped, even though they installed first
obfuscatedAccountIdAn ID your app passes when it starts a purchase; Google returns it with the purchaseTies every payment to the user you credited
Real-time developer notificationsGoogle publishes a message to a Cloud Pub/Sub topic when a purchase changesA prompt to look: a purchase, a renewal, a refund
Google Play Developer APIYour server reads the full purchase from GoogleThe record you pay on: state, order, test or not, your ID

The first two say who. The last two say what was paid. Keep them apart: a creator’s link never creates money on its own.

Step 1: carry the creator through the install

Unlike the App Store, Google Play passes something on. The Play Install Referrer API gives your app the referrer of the installed package, with the time of the click and the time the install began. Google’s Play Install Referrer Library (com.android.installreferrer:installreferrer) wraps it for Kotlin and Java: create an InstallReferrerClient, call startConnection, read installReferrer, then call endConnection.

Google keeps that information for 90 days, and it won’t change unless the app is reinstalled. So read it once, on the first launch after install, and store what you found.

Most installs don’t come from a creator. Credit one only when the referrer carries your own creator ID, and never fall back to matching people by IP address or device.

Step 2: put your ID into every purchase

When your app starts a purchase, BillingFlowParams.Builder has setObfuscatedAccountId: a string tied to the buyer’s account in your app. Google returns it on the Purchase object, and the Google Play Developer API returns it as externalAccountIdentifiers.obfuscatedExternalAccountId. Store which creator brought that ID, and every later payment finds its creator.

  • 64 characters at most. A UUID fits.
  • No personal data. Google says not to put PII such as e-mail addresses in it in cleartext; purchases that do are blocked. Use a random ID or a one-way hash.
  • Google reads it too. Google Play can use it to spot irregular activity, such as many devices buying on one account in a short time.

Already set obfuscatedAccountId for your own user IDs? Keep it. Map your existing ID to the creator on your server instead of replacing it.

Step 3: get told about every payment

Google Play doesn’t post to a URL. It publishes real-time developer notifications (RTDN) to a Google Cloud Pub/Sub topic. You set the topic per app in Play Console under Monetization setup → Real-time developer notifications, as projects/{project_id}/topics/{topic_name}, and give Google’s service account google-play-developer-notifications@system.gserviceaccount.com the Pub/Sub Publisher role on it. Send Test Message checks the setup.

If you sell one-time products too, pick the option that includes them; the other option sends subscriptions and voided purchases only.

NotificationWhat it means for commission
SUBSCRIPTION_PURCHASEDA new subscription: the first commission, pending
SUBSCRIPTION_RENEWEDA renewal: another commission inside the offer’s period
SUBSCRIPTION_RECOVEREDRecovered from account hold or resumed from a pause: a renewal commission
ONE_TIME_PRODUCT_PURCHASEDA one-off purchase: commission
voidedPurchaseNotificationA refund, chargeback or cancellation: reverse that commission, fully or for the refunded quantity
SUBSCRIPTION_CANCELED, ON_HOLD, IN_GRACE_PERIOD, PAUSED, EXPIREDAuto-renew off, a payment problem, a pause or the end: no money moves
testNotificationYour setup works

A notification only says that a purchase changed. Google’s docs say to call the Google Play Developer API afterwards for the complete status.

Step 4: read every purchase back from Google

For a subscription, call purchases.subscriptionsv2.get with the package name and the purchase token from the notification. The answer gives the subscription state, its line items with the latest successful order ID, externalAccountIdentifiers with your obfuscated ID, and a testPurchase field that is there only for test purchases.

Treat the push as a hint and the API answer as the record. If you pay only on what Google’s API returns, a forged message can’t create a commission.

Pub/Sub can deliver the same message more than once. Each one has a messageId, and Google recommends checking it so you don’t process a notification twice.

Refunds can slip through too. The Voided Purchases API lists purchases that were refunded, cancelled or charged back in the past 30 days. Read it daily and book any refund whose notification never arrived.

Testing without real money

Add testers in Play Console under Settings → License testing, as an e-mail list or a Google Group. License testers get test payment methods, so nobody is charged, and test subscriptions renew fast: a monthly plan renews about every 5 minutes, at most six times. Acknowledge test purchases, or Google refunds them after 3 minutes.

The Developer API marks these purchases with testPurchase. Keep them in a separate test ledger and never pay commission on them.

What not to pay on

  • Installs and referrers: nobody has paid yet.
  • Free trials: nothing was charged.
  • Anything your app reports about a purchase that Google’s API doesn’t confirm.
  • License-tester purchases.

How AppCut does this

In AppCut this is the Google Play setup on the developers page: two pastes in Play Console, and no Google Cloud project of your own while nothing else uses your notifications topic. Invite AppCut’s e-mail under Users and permissions with View app information, View financial data and Manage orders and subscriptions, then paste AppCut’s topic under Real-time developer notifications. If your own server already uses that field, forward AppCut’s ready message to your developer. A new invite takes Google a few hours to switch on.

Only Google-signed pushes get in, and every purchase is read back from the Google Play Developer API before it counts. For credit, the Android SDK keeps the creator’s link or code under a random UUID that your app passes with setObfuscatedAccountId and Google hands back on every purchase, and it reads the Play Install Referrer when the offer uses AppCut’s landing page.

Questions

Does Google Play tell my app which link someone tapped?

Yes, through the Play Install Referrer: your app reads the referrer of the Play Store link that led to the install. Google keeps it for 90 days, so read it once, on the first launch. The App Store has no equivalent, which is why iOS programs lean on codes.

Do I need a Google Cloud project?

To receive real-time developer notifications yourself, yes: they arrive on a Pub/Sub topic in a Google Cloud project. With AppCut, if the topic field is still empty, you paste AppCut’s topic and need no project of your own.

How do refunds show up?

As a voidedPurchaseNotification, for refunds, chargebacks and cancellations. The Voided Purchases API also lists the past 30 days, so you can catch a refund whose notification never arrived.

Sources

Let creators sell it. Pay when it sells.

Free for your first 2 creators. Connect the App Store, Google Play or Stripe, publish an offer, and pay only on real revenue.

Run your app’s affiliate program · Creator payouts for apps