Store

Google Play real-time developer notifications setup for subscriptions

To set up Google Play real-time developer notifications, create a Pub/Sub topic, give Google's publisher account the Pub/Sub Publisher role, add a push subscription that points at your RevenueDot notification URL, and paste the topic name into Play Console. A service account lets RevenueDot read each purchase from the Play Developer API.

Free up to $10,000 a month in tracked revenue. Works with the RevenueCat SDK you already ship.

Play Developer API

Every purchase token is read from Google, acknowledged and checked again on each notification.

Pub/Sub push

Renewals, cancellations, holds and refunds arrive at your RevenueDot URL as Google sends them.

Voided-purchase backup

A daily scan of the last 30 days catches refunds whose notification never arrived.

Base plans

Products map to subscriptionId:basePlanId, such as pro:monthly.

Setup

How to set up Google Play real-time developer notifications with RevenueDot

  1. 01

    Create the Google Play app

    Add a Google Play app in RevenueDot with your package name. Its public SDK key starts with goog_. Start free on Cloud first if you have no account.

  2. 02

    Create a service account

    In Google Cloud enable the Google Play Android Developer API, create a service account and download a JSON key. In Play Console, Users and permissions, invite the service account's email with View app information, View financial data and Manage orders and subscriptions.

  3. 03

    Save the key and check it

    Drop the JSON file on the app in RevenueDot and click Check credentials. New Play Console permissions can take up to 36 hours to apply. Until then the check says the account works but cannot see the app yet.

  4. 04

    Create the Pub/Sub topic

    In Google Cloud Pub/Sub create a topic. Give google-play-developer-notifications@system.gserviceaccount.com the Pub/Sub Publisher role on it.

  5. 05

    Add a push subscription

    Add a subscription to the topic with delivery type Push and your app's notification URL as the endpoint. It looks like https://api.revenuedot.app/v1/notifications/google/{app_id}.

  6. 06

    Turn on notifications in Play Console

    In Play Console open Monetize with Play, Monetization setup. Paste the full topic name (projects/<project>/topics/<topic>), turn on subscriptions, voided purchases and one-time products, and click Send test notification. The app's status in RevenueDot turns Ready.

How it works

How RevenueDot treats each Pub/Sub message

  • RevenueDot stores the raw message once, keyed by message ID, and copies it to a forwarding URL when you set one.
  • It then reads the purchase again from the Play Developer API, so a forged message cannot grant access.
  • Voided-purchase notifications record refunds.
  • You can also require Google-signed pushes: turn on authentication on the subscription and save the same audience and service account on the app. An unsigned push then gets 401.

What Pub/Sub gets back

StatusWhenEffect on Pub/Sub
200The message is handled, a duplicate, for another package name, or about an invalid purchase tokenStops retrying, because a retry would never succeed
500 or 503A temporary failure, such as Google's API not answeringDelivers the message again
401Authentication is on and the push has no valid Google-signed tokenMessage is rejected

Catalog

Product IDs for base plans

Create a subscription product in RevenueDot with store_identifier set to subscriptionId:basePlanId, for example pro:monthly. For one-time products use the product ID. Android purchases do not name the base plan, so RevenueDot gives a bare subscription ID the union of its base plans' entitlements when it builds the offline entitlement map.

Create the app and read the notification URLterminal
curl -s -X POST "$REVENUEDOT_URL/v2/projects/$PROJECT_ID/apps" \
  -H "Authorization: Bearer $SECRET_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Scanner (Android)","type":"play_store","play_store":{"package_name":"com.example.scanner"}}'

curl -s "$REVENUEDOT_URL/v2/projects/$PROJECT_ID/apps/$APP_ID/store_settings" \
  -H "Authorization: Bearer $SECRET_KEY" | jq -r .notification_url

Beyond validation

What you can do from the server afterwards

Before you rely on a store action, run it once against a Play test track. See testing with license testers.

  • Refund and revoke a subscription, cancel it (turn auto-renew off) or defer the next renewal by up to 365 days.
  • Refund a one-time purchase.
  • Restore a purchase from a Google order ID such as GPA.1234-5678-9012-34567, which RevenueDot turns into a purchase token with Google's Orders API.
  • Create a subscription with one listing in Play Console from your catalog. Add base plans and prices in Play Console.

FAQ

Google Play: questions people ask

How do I set up Google Play real-time developer notifications?

Create a Pub/Sub topic, give google-play-developer-notifications@system.gserviceaccount.com the Pub/Sub Publisher role, add a push subscription to your notification URL, then paste the topic name under Monetize with Play, Monetization setup in Play Console and send a test notification.

Why does the service account check say it cannot see my app?

New Play Console permissions can take up to 36 hours to apply. The service account needs View app information, View financial data and Manage orders and subscriptions. Check again later.

What happens if RevenueDot is down when Google sends a notification?

RevenueDot answers 500 or 503 for temporary failures and Pub/Sub delivers the message again. Once a day RevenueDot also asks Google for the last 30 days of voided purchases as a backup.

Why must I acknowledge Google Play purchases?

Google refunds purchases that stay unacknowledged for 3 days. RevenueDot acknowledges each purchase after it reads it from the Play Developer API, which needs the service account.

Do I need to authenticate the Pub/Sub push?

It is optional. RevenueDot trusts only what Google's API returns for a purchase token, so a fake message cannot grant access. Turn authentication on if you also want unsigned pushes rejected with 401.

Get started

Run subscriptions without the revenue share.

Start free on RevenueDot Cloud, free up to $10,000 a month in tracked revenue, or move an existing RevenueCat app with one line of code.

Already have an account? Sign in · Prefer your own servers? Self-host free