In-App Purchase on Google Play (Android) using CocoonJS

1

Index

Stats

5,848 visits, 11,854 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 13 Sep, 2013. Last updated 19 Feb, 2019

I have struggled ALOT with this myself, and now I finally got it working, so i though I would share a bit :-)

Disclaimer!

I have not been able to get restore purchases to work, I will update the tutorial when i hopefully get it to work.

This is not a detailed explanation of each and every feature related to the IAP, but it will give you an introduction to the IAP with CocoonJS system, and hopefully enable you to make IAP work in your own app.

So in short... this is no fancy solution... at all. But I got it working and wanted to share :-)

Prerequisites

You need to sign up for a Google play developer account (here)

You need to sign up for a Ludei(CocoonJS) premium account (here)

Getting your product ready in Google Play

To get your app onto Google Play, follow this great tutorial.

once you have created your product and uploaded the APK to Google Play, we are ready to proceed.

You can see the product I have made here (called testIAP)

You will then see the Store Listing

Go to In-app Products

Click the Add new product button

There are 3 types of products:

Managed: User can only buy once. Google keeps track of purchase

Unmanaged: User can purchase many time (something like ingame gold) Google does not keep track

Subscription: A monthly subscription for your app

Select Managed

Enter a name for your product, in this case i have named it premium3

Press Continue

You will now have to enter information about the product (title, description and price)

After that is done, press the Auto-convert prices now button.

At the top set the product to Activate

Our In-app product is now ready in Google Play!

  • 0 Comments

Want to leave a comment? Login or Register an account!