Billing
Configure your in-app products and subscriptions.
info
You can skip this section if you don't want to use in-app purchases or subscriptions. Or comeback to it once you have finished adding your features and testing.
Setup Play Console
- Go to Play Store and create a developer account.
- Go to the Google Play Console and create a new app.
- Release the app to the internal test track. (Follow the release steps but select the internal test track instead of production)
Connect RevenueCat with Play Console
- Go to the RevenueCat Dashboard and create a new project.
- Add a new Android app to the project
- Follow the steps to connect RevenueCat with the Play Console.
- Follow RevenueCat steps to create your in-app products and subscriptions.
- Copy the Android's
Public API Key
from RevenueCat. - Go to the Firebase Console / Build / Remote Config and add the following keys:
REVCAT_API_KEY_ANDROID
with the value of the AndroidPublic API Key
from the previous step.
Map your RevenueCat products in the app
-
Open the
shared/src/commonMain/kotlin/com/zenithapps/mobilestack/model/Product.kt
file. -
Rename
STARTER
andALL_IN
to your products including theirpackageId
(from RevenueCat/Offerings/Packages/Identifier) andentitlement
(from RevenueCat/Entitlements/Identifier).enum class Product(val packageId: String, val entitlement: String) {
YOUR_PRODUCT_NAME("YOUR_PRODUCT_PACKAGE_ID", "YOUR_PRODUCT_ENTITLEMENT"),
...
OTHER("other", "other")
} -
Create a paywall in Revenue Cat with the same entitlement as the product.
Check products show in Android
- Run the Android app in a physical device or emulator.
- Go to the
Purchase
screen. - Check that your products are shown.
Test Android in-app purchases
- Go to the Play Store Console select your app and create a test user.
- Add the test user to the internal test track.
- Purchase a product with the test user.
Setup App Store Connect
- Go to the Apple Developer website and create an account.
- Go to the Identifiers section and create a new App ID.
- Go to the Certificates section and create a new iOS App Development Certificate.
- Go to the Certificates section and create a new iOS App Distribution Certificate.
- Go to the Profiles section and create a new Provisioning Profile for Development.
- If you will test in a physical device you will need to add the device to the Devices section.
- Go to the App Store Connect and create a new app.
Connect RevenueCat with App Store Connect
- Go to the RevenueCat Dashboard and add a new iOS app to the project you created.
- Follow the steps to connect RevenueCat with App Store Connect.
- Follow RevenueCat steps to create your in-app products and subscriptions.
- Copy the iOS's
Public API Key
from RevenueCat. - Go to the Firebase Console / Build / Remote Config and add the following key:
REVCAT_API_KEY_IOS
with the value of the iOSPublic API Key
.
Enable RevenueCat in iOS
Open the iosApp/iosApp/AppDelegate.swift
file and replace:
billingProvider = MockBillingProvider()
with:
billingProvider = RevenueCatBillingProvider()
Check products show on iOS
- Run the iOS app in a physical device or simulator.
- Go to the
Purchase
screen. - Check that your products are shown.
Test iOS in-app purchases
- Go to the App Store Connect and create a test user.
- Add the test user to the internal test track.
- Purchase a product with the test user.