Appearance
Appearance
Sometimes players reach out to request refunds for their purchases that have been made via Google Play. Instead of navigating to the Google Play Console to process the refund, you can configure the LiveOps Dashboard to do the same via Google's Android Publisher API. In addition to being a faster workflow, this has the added benefit of enabling your customer support agents to give out refunds without having to provide them with accounts with permissions to deal with Google Play purchases directly.
Google Play Console has built-in helpers for making service accounts. In fact, most people already have at least one account automatically generated for them when integrating with Firebase for analytics.
For an up-to-date guide, please follow Google's instructions.
As a result of this step, you should have a .json
file with the new service account's credentials. Feel free to name it to something sensible, like google_play_credentials.json
.
Copy the credentials file to Backend/Server/Config
.
Review your config files under Backend/Server/Config
and edit the following lines in environments that should have the refunds enabled:
GooglePlayStore:
# Turn the feature on both in the Game Server and the LiveOps Dashboard.
EnableGooglePlayInAppPurchaseRefunds: true
# Enable the server to use the Android Publisher API.
EnableAndroidPublisherApi: true
# Path to your credentials file.
AndroidPublisherApiServiceAccountPath: "./config/google_play_credentials.json"
💡 Pro tip
You can have refunds enabled in multiple environments that can have their own unique SKUs. The actual transactions that end up being refunded depend on the selected AndroidPackageName
.
Use the app to make a (debug) purchase via Google Play. Now you can mouse-over that purchase in a player's purchase history to see a refund button. Use the button to request a refund and verify that it went through in the Google Play Console.
After enabling the feature, Google Play purchases have a new refund button!
⚠️ Heads Up
We don't have a way at the moment to sync the "refund" status of individual purchases from Google Play's API. For now, this feature is just an easier way of doing the same via the Google Play Console.