In-App Purchases

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.

Step 1
2

Please click the link down below:

3

Create a new project or select an existing project.

Step 2
4

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

Step 3-1Step 3-2

Please click the Enable button both of them.

5

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

Step 4
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.
Step 5Step 6
7

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

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

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

Step 8
9

Please pick the JSON and click the Create button.

Step 9
10

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

Step 10
12

Step 12
13

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

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

Step 14
15

Paste it in here and scroll down a little bit.

Step 15
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
Step 16
17

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

  • Write your app package name in here.
Step 18
18

Pick a Google Developer Notification Topic ID.

  • Click the Connect to Google button.
Step 19
19

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

Step 20
20

Go to the Play Console.

Step 21
21

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

Step 22
22

Fill the form

Step 23
23

Go to the Monetization section.

Step 24
24

  • Paste your Developer Notification Topic ID in here.
  • Pick notification content.
Step 25
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.