Integrations

Connect your Dashboard with your existing Online Video or Third-party Platform.

Android

This guide describes how to set up InPlayer in-app payments for your Android app. When setting things up, please make sure to take your time and follow each step in the below instructions carefully.

If you are planning on using in-app purchases, make sure to let us know so we can enable the proper payment gateway on your account.

Connecting your InPlayer and Google Play Store accounts

First, log into your InPlayer Dashboard.

Go to Settings, then Integrations, and finally In-App integrations.

Click on Google Play.

Enter the Site Verification Token and the Android Service Key from your Google account, and click Save.

Your InPlayer and Google accounts are now integrated.

How to find the Site Verification Token and the Android Service Key

Site Verification Token

Go to Google Search Console.

Select URL prefix.

Go back to the Integrations tab of your InPlayer dashboard.

Click Copy URL.

Paste the copied URL in the Google Search Console Page, and click Continue.

The verification token will be displayed.

Copy the token, without the .html part, and paste it in the InPlayer dashboard.

Before you can verify the token in Google, you will need to also enter the Android Service Key in the InPlayer panel, and save the settings there.

Read on to learn how to get the service key.

Android Service Key

Go to the Google Cloud Platform.

You will need to create a new project and a topic.

Note that this guide assumes that you do not already have a linked project in your Google Play Console. If you do, instead of creating a new project, use the existing one and create the topic there.


Creating the project

Start by creating the new project. (If you already have one, skip this step and move to creating the topic.)

In the new project, click on ADD PEOPLE TO THIS PROJECT.

In New principals, add the admin email of your Google developer account.

Under Roles, select Owner.

Click SAVE.

You can now create the topic.

Creating the topic

From the left-hand menu, scroll down to Pub/Sub, and click on Topics.

Click on ENABLE API.

This enables API notifications to the InPlayer platform.

You might not have to click ENABLE API, if you have already enabled APIs on your console. If so, just continue with the next step.


Next, click on CREATE TOPIC.

For Topic ID, enter inplayer-notifications. Copy the Topic name shown under the Topic ID field and save it somewhere on your PC. You’ll need it later. Finally, click CREATE TOPIC.

In the info panel on the right, under Permissions, click ADD PRINCIPAL.

If you don’t see the info panel, click SHOW INFO PANEL at the top right of the page.


Under New principals, add the following URL:
google-play-developer-notifications@system.gserviceaccount.com

Under Role, go to Pub/Sub, and select Pub/Sub Publisher.

Click SAVE.

Go to the API library, select your project, and click ENABLE to enable the API for it.

Next, you need to create a service account.

Go to the Google Cloud Platform, and from the left-hand menu, go to API & Services and then to Credentials.

Click on CREATE CREDENTIALS and select Service account.

Set up the new service account.

In Service account name, enter inplayer-notifications.

Click Create and Continue.

Under Role, go to Pub/Sub and select Pub/Sub Subscriber.

Click Continue.

Click Done.

Open the service account you just created.

Go to the KEYS tab.

Click on Add key and Create new key.

Under Key type, select JSON.

Click Create.

The file with the service key will be downloaded to your device.

Open the file in a text editor. Copy the entire content of the file and paste it in the InPlayer dashboard.

Once you have both the Site Verification Token and the Android Service Key in the InPlayer dashboard, click Save.

You can now go back to the Google Search Console and verify the Site Verification token as well.

Now you need to create a new subscription.

Go to the Subscription page of the Google Cloud Platform, and click CREATE SUBSCRIPTION.

Set up the new subscription.

Give it an ID.

From the Select a cloud pub/sub topic dropdown menu, select the same topic you created earlier.

Under Delivery Type choose Push, and in Endpoint paste the InPlayer notification URL.

To get the URL, go to the Integrations tab of your InPlayer dashboard.

Click the Copy URL button.

Paste the copied URL in the Google Cloud Platform form.

Under Expiration period choose Never Expire.

Click Create.

Next, go to the Google Play Console.

Go to Users & permissions.

Click on Invite new users.

For the email of the new user, use the “client_email”: value in the Service Key you’ve downloaded previously.
It will look something like this:
inplayer-notifications@curious-entropy-309114.iam.gserviceaccount.com

Under Permissions, in the App permissions tab, click on Add app, select the app you are going to use, and click Apply.

In the new permissions screen, check the following permissions:

  • View app information (read only)
  • View financial data
  • Manage orders and subscriptions

Click Apply.

Go to the Account permissions tab.

Check the following permissions:

  • View app information and download bulk reports (read only)
  • Manage orders and subscriptions

Click Invite user and confirm the invitation.

Finally, go to All apps and click on your app.

Scroll down to Monetise and click on Monetisation setup.

Under Topic name, enter the Topic name of the inplayer-notifications topic you’ve saved previously.

In case you forgot to save the Topic ID previously, you can go back to the Pub/Sub section of the Google Cloud Platform where the Topic name will be listed.


Click Save changes.

Creating your InPlayer asset

The next step is to create your InPlayer asset.

We offer several different types of assets, so make sure to look at this section for instructions on how to create the correct asset type, depending on your wishes.

After you’ve created your asset, the next step is to create the in-app purchase, i.e. the Google Play product.

Creating the Google Play product

Next, you need to create the Google Play product. This is going to be the Google Play Store counterpart to the price option you have previously set up for your InPlayer asset.

Creating a PPV product

First, log into your Google Play Console.

Open your Google app.

In the left-hand menu, under Monetise, and under Products, go to In-app products.

Click on Create product.

Set up the new product.

In the Product ID field, enter the Product ID of the price option for the InPlayer asset you are monetizing.

To get the Product ID, go to the Assets or Packages tab of your InPlayer dashboard and open the asset or package you wish to use. Go to Price Options, open the price option for which you are creating the in-app purchase, and click the Copy in-app product ID button.

Paste the Product ID into the Product ID field in the Google Play Store product form.

Fill out the rest of the product details.

Set up the pricing.

Remember to use the same price as the one you’ve set up in the InPlayer merchant panel.

When you finish with everything, review your work and click Save.

After saving, click Activate.

And with that, you are done.

Creating a Subscription product

First, log into your Google Play Console.

Open your Google app.

In the left-hand menu, under Monetise, and under Products, go to Subscriptions.

Click on Create subscription.

Set up the new subscription.

In the Product ID field, enter the Product ID of the price option for the InPlayer asset you are monetizing.

To get the Product ID, go to the Assets or Packages tab of your InPlayer dashboard and open the asset or package you wish to use. Go to Price Options, open the price option for which you are creating the in-app purchase, and click the Copy in-app product ID button.

Paste the Product ID into the Product ID field in the Google Play Store product form.

You can only have a single in-app purchase (i.e. price option) for each subscription.


Click Create.

Fill out the rest of the product details.

Set up the pricing by clicking on Add a base plan.

Remember to use the same price and billing period here, as the ones you’ve set up in the InPlayer merchant panel.

Note that the default price here will be in USD, so make sure to take that into account.


Under Free trial, set up a free trial if you wish to have one. Remember to set the same free trial in the pricing of your InPlayer asset.

Using the Introductory price option, you can enable discount vouchers which you can create in your InPlayer dashboard. Read our In-app introductory offers guide for more on this.

Set the Grace Period to None.

When you finish with everything, review your work and click Save.

After saving, click Activate.

Using an existing Google PPV or subscription product

If you are using an existing Google PPV or subscription product, before you proceed with the steps below, always make sure that all the pricing and access type and duration details are the same in both the Google PPV or subscription product and the InPlayer asset. Once you do this, proceed with the step below.


First, log into your Google Play Console.

Open your Google app.

In the left-hand menu, under Monetise, and under Products, go to In-app products.

Open the product you want to use.

Copy the Product ID.

Go to the InPlayer Dashboard and open the asset to which you wish to connect your Google product.

Go to Price Options and open the price option you wish to connect to your existing Google product.

Go to Additional Info.

Check Use external In-App IDs.

Paste the Product ID from Google.

You can only have a single in-app purchase (i.e. price option) for each individual subscription.


Click Save to save the changes.

And with that, you are done.

If you have any questions in regards to any of this, don’t hesitate to contact us at clients@inplayer.com.