Kotlin SDK - Integration Guide
1. Create and Prepare Your Botsi Account
Sign up for an account Add your app Follow the Get Started with Botsi guide
If the Get Started with Botsi guide doesn't answer your questions, feel free to explore additional information in our help docs center and the following steps.
2. Connect Google Play to Botsi
Package name
The Package name uniquely identifies your app in the Google Play and is required for subscription handling in Botsi.
Go to Google Play Developer Console. Choose the app you need the ID. The Dashboard will open. Find the Package Name beneath your app’s name and copy it.
- Go to App Settings via the top navigation menu in Botsi.
- In the Android SDK section, paste the package name you copied earlier.
Upload the account key file
Upload the service account private key in JSON format to the Service account key file section. Click “Save”.
Enable Real-time developer notifications (RTDN) in Google Play Console
Real-time developer notifications (RTDN) are essential for accurate data tracking, as they provide immediate updates from the Play Store on events like refunds and more.
Go to App Settings via the sidebar menu in Botsi. Copy the value from the Enable Pub/Sub API field next to the Google Play RTDN topic name. In the Google Play Console, select your app and navigate to Monetize → Monetization setup from the left-hand menu. Under the Google Play Billing section, check the box to enable real-time notifications. Paste the copied value from the Enable Pub/Sub API field in Botsi App Settings into the Topic name field. Then click Save changes in the Google Play Console.
5. Set Up Products and Paywalls
Create Product
Go to Paywalls and Products → Products in the Botsi Dashboard
Click Create Product and fill in:
- Google Play Product ID - An identifier used for accessing your product on Android
- Base plan ID – When setting up a subscription's Product ID in the Play Store, you must provide a Base Plan ID
- Offers (optionally) - Offers provide discounted pricing for existing or churned subscribers.
Enter the Product ID as specified under Monetize with Pay → Products → Subscriptions → [Your Product].
Create Paywall
- Navigate to the Paywalls & Products → Paywalls tab
- Click “Create Paywall”
- Enter a Paywall Name
- Add the product created during the Create a Product step
- Click “Save as Draft”
Create Placement
- Navigate to the Placements & Segments → Placements tab
- Click “Create Placement”
- Enter a Placement Name
- Enter a Placement ID
- Click “Run Paywall” and select the paywall created during the Create Paywall step
- Click “Save & Publish”
6. Integrate Botsi SDK
-
SDK Repository:
https://github.com/BotsiTeam/BotsiSDK-Android -
Latest available version (tag):
0.0.4-beta
-
Installation:
Installation documentation
Example Usage
A basic example using all major SDK methods can be found in the SDK’s documentation:
View Example File
Key Methods Used in the Example:
Botsi.activate("public_key")
Botsi.getProfile()
Botsi.fetchProductIDs()
Botsi.getPaywall(from: "paywall_name")
Botsi.getPaywallProducts(from: paywall)
Botsi.logPaywallShown(for: paywall)
Botsi.makePurchase(product)
Botsi.restorePurchases()
Botsi.identify(_ userId: “system_user_id”)
Botsi.logout()
7. (Optional) Import Historical Data
Request CSV data export from RevenueCat/Adapty support Share the export with Botsi support to import your users’ historical data.