In this guide we’re going to look at how to add in-app purchases, meaning simple monthly and yearly subscriptions, into an app we have created with Bolt. We’ll also add a paywall to monetize part of the content in the app, and implement logic for checking whether the user is eligible to access content.
We are first going to create our project with Bolt, then you can start making your own changes to the apps. In this guide we’ll build an app that works on both iOS and Android, but you can of course choose to build for only one of those platforms if you prefer. Our example app is from this repository.
As the first step let’s open bolt.new and give the following prompt to get things started:
Why not just add subscriptions as part of the prompt?
This prompt should provide you a working app that has all the UI parts and code necessary for handling subscriptions. If you navigate around the application, you’ll notice that everything appears functional, and even the subscription logic is already in place. However, when you press the ‘subscribe’ button, nothing happens.
You might have noticed that the prompt includes the react-native-purchases package. This is RevenueCat’s React Native SDK, required for enabling in-app purchases. The reason subscriptions still don’t work at this stage is because Bolt uses an app called Expo Go to preview your app. Expo Go is a prebuilt preview app that comes bundled with a fixed set of native modules. These allow for rich interactions with native code — like building advanced UIs or accessing the camera — but they don’t include the native modules required for in-app purchases.
How RevenueCat’s SDK solves this
To address this limitation, react-native-purchases automatically detects when it’s running in Expo Go. When Expo Go is detected, the SDK enters Preview API Mode. In this mode, all native calls are replaced with mock APIs. While this means subscriptions won’t actually function in the preview, the integration won’t break either. Instead, you can safely navigate your app and verify that your subscription-related logic is wired up correctly, without interrupting your development flow.
At this point, you have a fully-functional app created with Bolt, including subscription logic and the RevenueCat SDK. All features should work as expected — except for actual subscription flows, which require native modules not available in Expo Go. You can continue using Bolt to build and enhance your app. Once you’re happy with the result, proceed to the next section to learn how to deploy your app using Expo Application Services (EAS), which will enable full subscription functionality.
Testing with Test Store
RevenueCat also has a built-in testing environment that works immediately without platform setup, called Test Store. Setting up Test Store does not need any additional configuration, the only requirement is using a Test Store API key. Test purchases made through Test Store behave like real purchases and subscriptions and allow you to build your app logic around subscriptions without having to configure App Store and Google Play subscriptions. Test Store also works on Expo Go.
We won’t cover Test store in this blog post, but it’s worth considering if you’re still testing out your app idea, and don’t want to spend time on setting up different stores before your app and subscription logic is fully built.
Now that our app has the basic UI for subscriptions in place, we can integrate the actual subscription logic using the react-native-purchases SDK from RevenueCat. Since the SDK includes native code, and our app uses Expo, we need to configure it to work with EAS Build, Expo’s custom build service.
To get started, download the project you have created with Bolt to your computer and open it in your IDE of your choice (e.g. VS Code, Cursor). You will also need the command line, so open that and navigate to your project folder to run the following command: