Setup in-app purchases for Android
We are using RevenueCat to handle in-app purchases.
First, you need a Google Play Developer Account to setup in-app purchases.
Firstly, you need to see like that screen in RevenueCat.
Please click the link down below:
Create a new project or select an existing project.
Go to the Google Play Android Developer API page and Google Play Developer Reporting API page
Please click the Enable
button both of them.
After clicking the Enable
button, go home page in Google Cloud Console.
Go to IAM & Admin > Service Accounts Page
Create Service Account
button.SMF RC Service Account
.Continue
and Done
button.After clicking the Done
button, you will see the screen like below.
3 dots
button.Manage Keys
button.Click the Add Key
button. Then click the Create new key
button.
Please pick the JSON
and click the Create
button.
Save the JSON file and keep it in a safe place. We’ll use it in the next step.
By the way: Go to Pub/Sub Developer Notifications
Google Play Console
section.Users and Permissions
Go back to Google Cloud Console and Copy the service account mail.
Paste it in here and scroll down a little bit.
Click the Account Permissions
button.
Grant the following permissions:
Turn back to the RevenueCat dashboard and drop a json file in here.
Pick a Google Developer Notification Topic ID.
Connect to Google
button.Then you will see like this screen. Copy the Google Developer Notification Topic ID.
Go to the Play Console.
Click the Create App
button if you don’t have any app.
Fill the form
Go to the Monetization
section.
Copy the RevenueCat Public Key and paste it in .env
file.
That’s it! You have successfully completed the setup for Android.