Android, Business

Android In App Payments

top android appsAs we know, user like free applications. However, we need to make a living out of our application, right?
One of the most popular method these days is In-App Payments. You can see this in many examples: Clash of clans, Netflix, Spotify and many more.
In this post, we’ll see how to perform common In-appPayments operations from Android applications.

What is this service?

In-app billing is a service hosted on Google Play that lets you charge for digital content or for upgrades in your app. You can request product details from Google Play, issue orders for in-app products, and retrieve ownership information based on users’ purchase history. Google Play provides a checkout interface that makes user interactions with the In-app Billing service seamless and provides a more intuitive experience to your users.

This is what it will look like to the users when you testing it:billing_test_flow

How to set it up

Each section here is a link to the official tutorial on

Preparing the ground

Before you can start using the In-app Billing service, you’ll need:

  1. Add the library that contains the In-app Billing API to your Android project.
    Well, It’s a definition of the interface that IAB exposes. This will enable us to call its methods.
  2. Set the permissions for your application to communicate with Google Play.
  3. Establish a connection between your application and Google Play.

Place products for sale

Before publishing your In-app Billing application, you’ll need to define the product list of digital goods available for purchase in the Google Play Developer Console.


Once your application is connected to Google Play, you can initiate purchase requests for in-app products. Google Play provides a checkout interface for users to enter their payment method, so your application does not need to handle payment transactions directly. When an item is purchased, Google Play recognizes that the user has ownership of that item and prevents the user from purchasing another item with the same product ID until it is consumed.
You can also query Google Play to quickly retrieve the list of purchases that were made by the user.

The main APIs’ calls :


and on consumable good (e.g. coins in a game):



To ensure that In-app Billing is functioning correctly in your application, you should test the application before you publish it on Google Play. Early testing also helps to ensure that the user flow for purchasing in-app items is not confusing or slow and that users can see their newly purchased items in a timely way.


There are few ways to optimize your monetization strategy. I wrote about it in the past specifically for games. But a good practices to follow will be:

  • Measure goals and make sure you setting the right goals. You can have a look at what the top apps are doing for your category.
  • Goals and conversions – Keep measuring the tracking what is working for you. It’s important to set the right segments and ‘customize’ for each segment as they all have certain needs.
  • A/B testing – Always test a new idea and see that the data show you it will add value.

Btw, the two images below tell the story of the ‘app eco-system’. You can see that the numbers are very low on ‘paid applications’ and that is what drove adoption of the freemium model.

The average application prices are quite low:

Average App Prices

The percentage of ‘free apps’ is growing to +90%.

Happy IAP!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s