Play Developer API
Every purchase token is read from Google, acknowledged and checked again on each notification.
Store
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.
Every purchase token is read from Google, acknowledged and checked again on each notification.
Renewals, cancellations, holds and refunds arrive at your RevenueDot URL as Google sends them.
A daily scan of the last 30 days catches refunds whose notification never arrived.
Products map to subscriptionId:basePlanId, such as pro:monthly.
Setup
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.
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.
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.
In Google Cloud Pub/Sub create a topic. Give google-play-developer-notifications@system.gserviceaccount.com the Pub/Sub Publisher role on it.
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}.
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
| Status | When | Effect on Pub/Sub |
|---|---|---|
| 200 | The message is handled, a duplicate, for another package name, or about an invalid purchase token | Stops retrying, because a retry would never succeed |
| 500 or 503 | A temporary failure, such as Google's API not answering | Delivers the message again |
| 401 | Authentication is on and the push has no valid Google-signed token | Message is rejected |
Catalog
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.
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
Before you rely on a store action, run it once against a Play test track. See testing with license testers.
GPA.1234-5678-9012-34567, which RevenueDot turns into a purchase token with Google's Orders API.FAQ
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.
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.
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.
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.
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
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