Appendix A: Complete RTDN Reference Table
This appendix provides a complete reference for all Real Time Developer Notification (RTDN) types. Use this as a quick lookup when building your notification handler.
RTDN Message Structure
Every RTDN message arrives as a Cloud Pub/Sub message with a base64 encoded JSON payload in the data field. The decoded JSON has this structure:
Only one notification field is present per message.
Subscription Notification Types
Note: Notification type codes 14, 15, 16, and 21 are not assigned. Do not expect to receive these values.
Subscription Notification Payload
One Time Product Notification Types
One Time Product Notification Payload
Note that one time product notifications include the sku field (the product ID), while subscription notifications include subscriptionId.
Voided Purchase Notification
Voided purchase notifications are sent when a purchase is voided due to a refund, chargeback, or revocation.
When you receive a voided purchase notification, revoke access immediately and call the Voided Purchases API for full details.
Test Notification
Test notifications have only a version field inside the testNotification object. Your handler should acknowledge these without processing them as real events.
Handler Pattern
Every RTDN handler should follow this pattern:
- Receive the Pub/Sub message
- Decode the base64
datafield - Parse the JSON
DeveloperNotification - Identify the notification type (subscription, one time, voided, or test)
- Extract the
purchaseToken - Call the Google Play Developer API to get the full, current state
- Update your database based on the API response (not the notification alone)
- Acknowledge the Pub/Sub message
Never rely solely on the RTDN payload for business logic. RTDNs signal that something changed. The API tells you what the current state is. Always call the API.