Google Play Store

Step-by-step guide for creating your Play service credentials

In order for RevenueCat's servers to communicate with Google on your behalf, you need to provide a set of service credentials. The process for configuring these credentials is a bit complex, but the added level of control improves security by providing RevenueCat with only the access we need.

📘

Credentials can take up to 36 hours after being created to be valid

It can take up to 36 hours for your Play Service Credentials to work properly with the Google Play Developer API. You may see "Invalid Play Store credentials" errors and be unable to make purchases with RevenueCat until this happens.

Setup

1. Link to a Google Cloud Project

Your Google Play Developer account needs to be linked to a Google Cloud Project.

1a. Open the Setup dropdown in the sidebar menu and select API access

12761276

1b. Select Link to connect your Google Play account to a Google Cloud Project

739739

1c. Agree to the terms and conditions

691691

2. Create a Service Account

Next we need to create a service account. This is done from the Google Play Console.

2a. Select Create new service account

15141514

2b. Follow the link to the Google Cloud Console

13351335

2c. Create the service account key credentials

13551355

2d. Name the service account and add a Pub/Sub Admin Role

These are the credentials that RevenueCat will need to communicate with Google. After filling in the details, select Create and Continue.

11001100

Add two Roles:

11421142

You can skip the optional third step, Grant users access to this service account, by selecting Done.

17441744

2e. Create and download the public key

In the Google Cloud Console, select Actions > Manage keys.

955955

Select ADD KEY > Create new key.

12781278

Make sure JSON is selected and select Create to create and download the JSON key.

702702
15521552

The downloaded JSON key is what you will need to enter in RevenueCat in step 4.

3. Grant Financial Access to RevenueCat

3a. Back in the Google Play Console, select Grant Access (under Setup > API Access) on the newly created RevenueCat service account

You are all done with the Google Cloud Console. Switch back to the Google Play Console and select Grant access for the newly created service account. If you do not see the service account you created, try refreshing the page.

15341534

This is in the Google Play Console.

3b. Grant the following permissions:

  • View app information and download bulk reports (read-only)
  • View financial data, orders, and cancellation survey responses
  • Manage orders and subscriptions
793793

3c. Select Invite User at the bottom of the page and send the invite

913913

You will be redirected to Users and Permissions where you should see your newly created service account as Active.

3d. Apply permissions to your apps

In the Users and Permissions section, select the service account and add your apps to the account. Select Apply on the sheet that appears.

13561356 18821882

❗️

Don't forget to Save Changes after applying the permissions!

4. Enter the Credentials JSON in RevenueCat

Copy and paste the credentials JSON that was downloaded in step 2 into your app settings in the RevenueCat dashboard. You can find your app under Project Settings > Apps. Now we'll be ready to handle Google Play purchases!

18721872

This configuration is in the settings of your app.

❗️

400 error when connecting to Google

If you're getting a 400 error when connecting to Google for Platform Server Notifications from the RevenueCat dashboard, ensure you've enabled Pub/Sub for your project in our guide here.


Did this page help you?