We are using RevenueCat to handle in-app purchases.

First, you need a Google Play Developer Account to setup in-app purchases.

Setup

1

Firstly, you need to see like that screen in RevenueCat.

2

Please click the link down below:

3

Create a new project or select an existing project.

4

Go to the Google Play Android Developer API page and Google Play Developer Reporting API page

Please click the Enable button both of them.

5

After clicking the Enable button, go home page in Google Cloud Console.

6

Go to IAM & Admin > Service Accounts Page

  • Click the Create Service Account button.
  • Add your Service Account Name like: SMF RC Service Account.
  • Pick your first role : ‘Pub/Sub Admin’
  • Other role should be ‘Monitoring Viewer’
  • Click the Continue and Done button.
7

After clicking the Done button, you will see the screen like below.

  • Click the 3 dots button.
  • Click the Manage Keys button.
8

Click the Add Key button. Then click the Create new key button.

9

Please pick the JSON and click the Create button.

10

Save the JSON file and keep it in a safe place. We’ll use it in the next step.

12

13

  • Go to the Google Play Console section.
  • Click Users and Permissions
14

Go back to Google Cloud Console and Copy the service account mail.

15

Paste it in here and scroll down a little bit.

16

Click the Account Permissions button. Grant the following permissions:

  • View app information and download bulk reports (read-only)
  • View financial data, orders, and cancellation survey response
  • Manage orders and subscriptions
17

Turn back to the RevenueCat dashboard and drop a json file in here.

  • Write your app package name in here.
18

Pick a Google Developer Notification Topic ID.

  • Click the Connect to Google button.
19

Then you will see like this screen. Copy the Google Developer Notification Topic ID.

20

Go to the Play Console.

21

Click the Create App button if you don’t have any app.

22

Fill the form

23

Go to the Monetization section.

24

  • Paste your Developer Notification Topic ID in here.
  • Pick notification content.
25

Copy the RevenueCat Public Key and paste it in .env file.

EXPO_PUBLIC_RC_GOOGLE_KEY=goog_...
26

That’s it! You have successfully completed the setup for Android.