How to configure and code Android in-app purchases in React Native apps
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:
- 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.
- 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:
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…