Set up real-time notifications
Deliver Google Play real-time developer notifications to Voidhash through an authenticated Pub/Sub push subscription.
Google Play sends real-time developer notifications (RTDN) when a purchase or subscription changes, for example on a renewal, cancellation or refund. Google publishes them to a Pub/Sub topic in your Google Cloud project, and a push subscription delivers them to Voidhash.
Upload your service account key and save the provider first: the push subscription authenticates as that account. Creating the topic in the same Cloud project keeps permissions simple.
Create a topic
In Google Cloud Console, open Pub/Sub → Topics and create a
topic, such as google-play-rtdn. Copy its full name, such as
projects/example-project/topics/google-play-rtdn.
Let Google Play publish
In the topic's permissions, add google-play-developer-notifications@system.gserviceaccount.com
with the Pub/Sub Publisher role. If your organization restricts sharing to its own domain, add
an exception for this account first.
Turn on notifications in Play Console
In Play Console, open your app and go to Monetize with Play → Monetization setup. Under Real-time developer notifications, check Enable real-time notifications, paste the topic name, choose Get all notifications for subscriptions and one-time products, and save.
Copy the push endpoint
In Studio, on the Google developer notifications tab, copy the RTDN push endpoint URL. Optionally paste the topic name into Google Play RTDN topic name for reference; it doesn't affect delivery.
Create a push subscription
In Google Cloud, open Pub/Sub → Subscriptions, click Create subscription, select your topic, and set:
- Delivery type: Push, with the endpoint URL from Studio.
- Enable authentication: on, with the service account whose key you uploaded.
- Audience: empty. If you enter one, it must be exactly the endpoint URL.
- Enable payload unwrapping: off.
Creating it needs permission to act as the service account, such as Service Account User on it.
The Pub/Sub service agent, service-PROJECT_NUMBER@gcp-sa-pubsub.iam.gserviceaccount.com, needs
Service Account Token Creator on the service account or its project; click Grant if the
console offers it.
Send a test message
In Play Console, click Send Test Message under Real-time developer notifications. Then open the subscription's Metrics in Google Cloud: Voidhash acknowledges each notification it accepts, so unacknowledged messages stay near zero.
Troubleshooting
Pub/Sub retries a notification until Voidhash acknowledges it. Check the response codes in the subscription's push metrics:
| Code | Cause | Fix |
|---|---|---|
401 | The push isn't authenticated as this provider expects. | Turn on authentication with the service account from the uploaded key, leave the audience empty, and copy the endpoint URL again. |
503 | Voidhash has no readable service account key for the provider in the URL. | Upload the key, save, and send another test message. Check that the URL belongs to an existing provider. |
500 | Voidhash couldn't process the notification right now. | Nothing: Pub/Sub delivers it again. |
Voidhash acknowledges and ignores notifications for a package other than the provider's Google Play package name. If apps share a topic, give each its own provider and push subscription.
Next steps
- Back to Set up real-time developer notifications in Connect Google Play
- Next: Verify the connection in Connect Google Play
Still stuck? Check Troubleshooting, ask us on Discord, or email support@voidhash.com on a paid plan.
Something wrong or missing on this page? Tell us by email or on Discord.