Real-Time Developer Notifications (RTDN)
Real-Time Developer Notifications (RTDN) are how Google Play tells Botsi about events that happen outside your app: renewals, cancellations, refunds, billing problems. They're the Google Play counterpart to App Store Server Notifications. Google Play publishes each notification to a Cloud Pub/Sub topic, and a push subscription on that topic delivers it to Botsi.
Before setting this up, connect Botsi to Google Play (Connect to Google Play), give the service account its Play Console permissions (Grant Permissions), and enable the Cloud Pub/Sub API (Enable Developer APIs).
Your RTDN URL is in the Botsi dashboard under App Settings → Google Play Store → Google Play RTDN topic name, as URL for Google server notifications. It has this form:
https://api.botsi.com/v2/notifications/google/<notification-key>The dashboard shows the same URL on app.botsi.com, which works the same way. See Notification URLs.
Pointing the push subscription at Botsi#
- In the Google Cloud console, go to Pub/Sub → Subscriptions.
- Open the push subscription on your RTDN topic and choose Edit.
- Set the endpoint URL to your Botsi RTDN URL.
- Save.
What Botsi needs#
All three must be set before notifications can be processed:
- Your app's Package Name in Botsi.
- The service account JSON key in Botsi.
- Access to the Google Play Orders API for that service account. Botsi reads the charged order for every purchase and renewal.
Without Orders API access, every notification fails
A missing service account key or missing Orders API access fails each notification with 500. Pub/Sub keeps retrying, and nothing is recorded until you fix it.
How Botsi verifies notifications#
The decoded notification's package name must equal the Package Name saved in Botsi. Botsi doesn't check a Pub/Sub push authentication token, so you don't need to turn one on for the subscription.
A package name mismatch is dropped, not retried
A notification that can never succeed, such as one for a different package name or a malformed message, is acknowledged with 200 and not processed. Pub/Sub never redelivers it, so check the Package Name in Botsi before you point the subscription at Botsi.
What Botsi records#
Each notification updates the subscriber's status and Access Levels. Botsi also records revenue from it:
Revoked and test notifications aren't recorded as revenue. Test purchases are recorded as sandbox.
Responses#
Pub/Sub retries any response other than 2xx.