Tools / Google Play RTDN Decoder

Google Play RTDN Decoder.

Decode Google Play Real-time Developer Notifications from Pub/Sub messages and name each notificationType.

Runs in your browser

The push body, the message object, the Base64 message.data, or one message per line.

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Summary
What to do next
DeveloperNotification
Messages

About Google Play RTDN Decoder

Google Play sends Real-time Developer Notifications (RTDN) through Cloud Pub/Sub. Your endpoint receives a push body whose message.data is Base64-encoded JSON, and inside that JSON the event is just a number: notificationType 4 means SUBSCRIPTION_PURCHASED, 3 means SUBSCRIPTION_CANCELED, 13 means SUBSCRIPTION_EXPIRED. This decoder unwraps the Base64, parses the DeveloperNotification and names the event. Paste the whole push body, only the message object, the bare Base64 data, or the already decoded JSON. You get the package name, the event time in UTC, the kind of notification (subscription, one-time product, voided purchase or test), the named notification type, the product or SKU and the purchase token, plus the exact Google Play Developer API request to make next, such as purchases.subscriptionsv2.get for that token. Exports with one message per line are decoded in bulk and counted by type, which helps when you replay a dead-letter queue. The most common mistake with RTDN is treating the notification as the purchase state. It is only a signal: the message carries no expiry date, price or acknowledgement status, and notifications can arrive late, twice or out of order. Always fetch the current state from the Developer API before granting or revoking access, and acknowledge new purchases within three days or Google refunds them. Unknown notification type numbers are shown as unknown rather than guessed. Decoding happens in your browser and nothing is uploaded.

How to Use

  1. Copy the Pub/Sub push body (or the message.data value) from your endpoint logs.
  2. Paste it into the input field.
  3. Read the named notification type and make the suggested Developer API call.

Frequently Asked Questions

What does notificationType 2 mean?

For subscriptionNotification, 2 is SUBSCRIPTION_RENEWED, 4 is SUBSCRIPTION_PURCHASED, 3 is SUBSCRIPTION_CANCELED and 13 is SUBSCRIPTION_EXPIRED. For oneTimeProductNotification, 1 is ONE_TIME_PRODUCT_PURCHASED and 2 is ONE_TIME_PRODUCT_CANCELED.

Why doesn't the notification include the expiry date?

RTDN is a lightweight signal. Google expects you to call the Play Developer API with the purchase token to read the current state, including expiry, auto-renewal and acknowledgement.

Can I decode many messages at once?

Yes. Put one JSON message per line (for example an export from a Pub/Sub subscription) and the tool decodes each line and counts the notification types.

Is the purchase token sent anywhere?

No. Everything runs in your browser and the page makes no network requests while you use it.

Related Tools