Billing
Google Play Billing
📱

Google Play Billing is only supported on Android platform.

1. Packaging an App bundle for Play Console

Before setting up the Play Console, we need to build an App Bundle, this is an one time process

🔑

Please follow the steps to Setup Keystore for Android from Authentication → Methods → Google Play Games before following these steps. But you don't need the SHA1 for setting up Billing.

  1. Go to your Project SettingsEOS Integration Kit then tick Enable Google Play Billing Enable Google Play Billing Ticked

  2. Go to Project SettingsAndroid, and under App Bundles, tick Generate bundle (AAB) Generate AAB Ticked Image

Suggested API levels are: SDK Levels

  1. Close Project Settings

  2. Now package your project for Android to get the AAB Packaging

⚠️

Before packaging, make sure to set Android Package Name in Project SettingsAndroid to what you want in your Play Console, this cannot be changed in the future.

⚠️

Make sure Enable Google Play Billing is ticked in Project SettingsEOS Integration Kit before Packaging

2. Settings up License Testing

Now, open your Play Console. To test Play Billing purchases, you need to setup License Testing on your Play Console:

  1. Go back to your main Play Console account dashboard where you see all the apps

  2. Click on Settings Settings

  3. Go to License Testing License Testing

  4. Create an email list if you don't have one

  5. Name the list anything you want (e.g. MyList) and add one or more of your email addresses

  6. Select the email list

  7. Set License response to RESPOND_NORMALLY License Testing Email Selected

  8. Click Save changes

2. Setting up Google Play Console Testing

As of now, we need to setup a Test Release in order for Billing to work. Follow these steps to setup a Test Release:

  1. Create a new App on your Console (if you don't already have one)

  2. Go to Monitor and improvePolicy and programsApp Content Privacy Policy

  3. There, put a link to your Game's Privacy Policy, and click Save

  4. Now, go to Test and ReleaseTestingInternal Testing Internal Testing

  5. Go to Testers tab, then select the email list you selected for License Testing

  6. Click Save

  7. Then go back to Releases tab, then click Create new release

  8. Enter any release name you want

  9. Upload the aab file we built before, then wait for it to upload and optimize

  10. Click Next, then click Save and publish

  11. After the Internal Testing release has been published, go to the Testers tab in Internal Testing, and copy your test link Testing Link

  12. Open the copied link on your Android device, then click Accept Invite Accept Invite

⚠️

Make sure you're signed into one of the testing accounts that you entered in the list that we created in Section 2 step 5

3. Setting up In-app purchases

In sections 3 and 4, we'll be focusing on these menus: Monetize with Play

  1. Open your App's dashboard again

  2. Go to Monetize with PlayIn-app products

  3. Click Create product

  4. Enter an unique Product ID, this will be used as an input to our Blueprint code in future

  5. Fill out the rest, and click Save, then click Activate

4. Setting up Subscriptions

  1. Go to Monetize with PlaySubscriptions

  2. Click Create subscription

  3. Enter an unique Product ID, this will be used as an input to our Blueprint code in future

  4. Enter the Subscription's Name, then click Create

  5. Click Add base plan, Enter an unique Base plan ID, this can be optionally used in our Blueprint code if needed

  6. Select all or needed Country / region, then click Set price, set your price and click Update, then click Save

  7. Activate the subscription by clicking Activate

4. Implementing Play Billing logic

EIK Provides the following Google Play Billing Nodes and Structures: GPBL Nodes GPBL Structures

Cannot view the code? Click here (opens in a new tab)

Download the test widget here (opens in a new tab). (UE 5.4 or above)

Working Demo

Suggested Reads

Target API level requirements for Google Play apps (opens in a new tab)

Google Play's billing system (opens in a new tab)

About subscriptions (opens in a new tab)

Testing your integration (opens in a new tab)

Last updated on