How to configure and code Android in-app purchases in React Native apps

Tasos Maroudas
React Native Training
7 min readAug 22, 2018

--

Image 1: Preparing for an in-app purchase

In-app purchases! A way, among others, to make money from your mobile application. Probably not the cheapest option out there, in terms of 3rd party commission, but it stands out as a native option for your apps.

Let’s get started

In order to make payments work there is a 2 step process we need to follow:

  1. Configure the in-app product in Google Play Developers’ Console and choose the type of charge (one time fee or recurring subscription) along with its cost.
  2. Code it inside the app with the help of a bridge package like react-native-billing

Let’s move on and see how to configure an in-app product of one time charge.

Open the Google Play Console

As we login with our account to Google Play Console, we choose the application we want to configure and from the vertical left menu we navigate to Store presence -> In-app products:

Image 2: In-app products screen for an app in Google Play dev’s console

In this app we have setup 3 products. Each product consists of a set of properties that we first need to configure. In order to…

--

--

Tasos Maroudas
React Native Training

❤ React Native. Part time blogger. CTO & Founder of Coded Lines Ltd