Implementing In-App Purchases with RevenueCat — My First Time in Flutter

Easy in iOS, Different in Flutter
In-app purchases in Swift were a familiar task. Use the StoreKit API, follow the established patterns, done.
Flutter was different.
Flutter's official in_app_purchase package exists, but handling both iOS and Android purchases required platform-specific branching, making the code complex. Building subscription management, receipt validation, and restore purchases all from scratch was more work than expected.
Discovering RevenueCat
While researching Flutter in-app purchases, I found RevenueCat.
RevenueCat is a platform that abstracts in-app purchases and subscription management. Here's what it does:
- Manage App Store and Play Store products from one RevenueCat dashboard
- Handle iOS/Android purchases with a single Flutter SDK
- Automatic subscription status and receipt validation on the server side
- Built-in analytics and metrics
My first reaction was "if it's this convenient, there must be a catch." But the basic plan was free — no cost burden for small-scale apps.
Where I Got Stuck — Keystore Setup
Ironically, it wasn't RevenueCat itself that tripped me up, but the Android setup.
To sign an Android app, you need a keystore. It's similar in concept to iOS certificates and provisioning profiles, but the management approach is different. Generating the keystore file, adding signing configuration to build.gradle, connecting it to RevenueCat's Play Store integration — it was my first time doing all of this, so I went back and forth through the documentation many times.
That awkwardness of an iOS developer encountering the Android ecosystem for the first time. Different terminology, different tools, different workflows.
I eventually sorted it all out, but Android in-app purchases hit a different wall. More on that in the next post.