Connect Google Play
Configure Google Play Developer API access for purchase validation and subscriptions.
Connect Google Play after the Android app and subscription products exist in Play Console.
Configure API access
Enable the Developer API
Create or choose a Google Cloud project, then enable the Google Play Android Developer API. Google no longer requires linking that Cloud project to the Play developer account.
Follow Google's Developer API setup.
Create a service account
In Google Cloud, create a service account and a JSON key. Keep the downloaded key private.
In Play Console, open Users and permissions, invite the service account email, and grant:
- View financial data, orders, and cancellation survey responses; and
- Manage orders and subscriptions.
Scope access to the app where possible.
Add the provider in Voidhash
In Studio, open Settings → Payment providers → Google Play. Enter the Android application ID
from Gradle, such as com.example.app, then upload the service account JSON key.
Save the configuration and enable the provider.
Connect products
Open each Voidhash product and add the matching Google Play subscription product. Select the base plan or offer that should be available in the app.
Real-time developer notifications
RTDN keeps subscription state current when the app is not running. To configure it:
- Create a Pub/Sub topic in Google Cloud.
- Grant
google-play-developer-notifications@system.gserviceaccount.comthe Pub/Sub Publisher role on that topic. - In Play Console, open Monetize → Monetization setup and enable real-time notifications.
- Enter the full topic name:
projects/{project_id}/topics/{topic_name}. - Send a test message, then save.
- Enter the same topic name in the provider's optional RTDN field in Voidhash.
Google's Play Billing setup guide has the current Pub/Sub instructions.
Use the optional forwarding URL only when your backend also needs the raw Google event.
Verify
- Publish the app to an internal test track.
- Add the tester account and install the Play-distributed build.
- Confirm
useProducts()returns the expected localized product. - Complete a test purchase and check for an active grant in
useCurrentPerson(). - Send an RTDN test message and verify the provider remains healthy.
Use a Play-distributed build
Google Play Billing behavior depends on the installed package, signing key, tester account, and track. A locally sideloaded build is not a reliable end-to-end subscription test.