One Expo App, Three Stores: iOS, Android and Web Subscriptions
A single React Native codebase can sell the same monthly subscription on iOS, Android and the web when each store product is mapped to one shared entitlement. This guide walks through the store-side configuration, the Stripe connection for web billing, and the react-native-purchases hooks that fetch packages, start a purchase and check access. It is a setup walkthrough, not a promise of a fixed build time.
What you are building
The target is one Expo app that renders the same paywall UI on three platforms. Each platform has its own product record, but all three records point at the same entitlement, for example premium. Your app then asks one question — does the customer have an active premium entitlement? — instead of branching on platform.
Before touching code, confirm you have: a subscription platform account and project; an App Store Connect app with an in-app purchase subscription; a Google Play Console app with a subscription and base plan; a Stripe account connected to the subscription platform for web billing; and a development build of your Expo app, because react-native-purchases contains native code and will not run in Expo Go.
Step 1: Create the store products
Start by creating an account in the subscription platform you have chosen; its dashboard is where products, entitlements and customer data are managed. From there you connect each store: App Store Connect, Google Play Console, and Stripe for web billing. The connection guides are linked from the source registry below.
A useful rule before you start: decide the entitlement name once (for example premium) and reuse it everywhere. Every product you create in the next three subsections should be attached to that same entitlement.
iOS: App Store Connect product
Settle four values before you open any console: reference name, product ID, duration and price tier. The walkthrough example uses 1_month_premium_ios for both the reference name and the product ID, a 1 Month duration, and a tier such as Tier 3. App Store Connect also wants localized display names, a screenshot (an empty image is acceptable during testing) and descriptions.
Two review rules matter. The subscription is submitted for review alongside the app, and its information must stay accurate afterwards.
In the subscription platform dashboard, add a product with the exact same product ID, set the store to App Store and the type to Subscription, then attach it to the premium entitlement.
Android: Google Play Console product
Link your subscription platform to Google Play using the service-credentials guide first. The Play Console subscription record needs a name and a product ID. Treat the product ID as permanent: it cannot be reused after deletion, so a pattern such as <app>_<entitlement>_<version> keeps future versions unambiguous.
The base plan is where Android stores the billing period, price and renewal type. Match the iOS product: one month, auto-renewing. Once the base plan exists, the subscription platform can use the subscription.
Web: Web Billing product in the subscription platform
Web billing products are created inside the subscription platform dashboard rather than a separate store console: open the project settings, go to Products, click New, and choose the Web Billing app. Fill in the details for a monthly subscription matching the iOS and Android versions. The Stripe account must already be connected.
When all three products exist and each is linked to premium, the configuration side is done.
Field and control map
Use this map to keep the three product records consistent. It is a checklist, not a substitute for each store's current console.
Step 2: Add react-native-purchases
Install react-native-purchases and rebuild a development build. The package works on iOS, Android and web, which is why one purchases module can serve all three targets.
Create purchases.ts and use the supplied module code0001. It exposes three hooks: initializePayments configures the SDK with an API key and an app user ID; usePackages fetches offerings and returns the current available packages plus a purchasePackage function; useCustomerInfo fetches customer info, subscribes to update events, and exposes hasActiveEntitlement(entitlementId).
Render packages and handle a purchase
In App.tsx, call usePackages and map each package to a PackageCard. The supplied module code0002 shows the screen wiring; module code0003 shows the card, which displays the product title, description and price string and calls purchasePackage on press.
Gate premium content with useCustomerInfo and hasActiveEntitlement('premium'). Keep the entitlement ID in one constant so the paywall and the access check cannot drift apart.
Worked example: one monthly product, three records
Suppose the entitlement is premium and the monthly price is the same everywhere. On iOS you create 1_month_premium_ios in App Store Connect and add the identical product ID in the subscription platform dashboard. On Android you create a product ID following the <app>_<entitlement>_<version> pattern with a one-month auto-renewing base plan. On web you create a Web Billing product in the subscription platform dashboard. All three are attached to premium.
Linking products to one entitlement is what lets a customer who buys on the web and later signs in on iOS see premium active: the app checks the entitlement, not the store. Verify that behavior in your own project before relying on it.
Two different failures to distinguish
An empty package list and an inactive entitlement are not the same problem. If usePackages returns nothing, the app is not seeing an offering — check that products exist, that they are attached to the current offering, and that the SDK was configured before the fetch. If a purchase completes but hasActiveEntitlement returns false, the product is probably not linked to the entitlement you are checking, or the entitlement ID string differs from the one in the dashboard. Log the offerings and the active entitlement keys before changing code.
Testing pointers
Run the app on a simulator or emulator and confirm the configured subscriptions appear and that tapping one starts a purchase. Platform-specific testing steps are linked in the source registry for iOS, Android and web billing. Treat those linked guides as the authority for current test-account behavior.
| Field | iOS (App Store Connect) | Android (Play Console) | Web (subscription platform dashboard) |
|---|---|---|---|
| Reference / name | 1_month_premium_ios | Name plus product ID | Product details in dashboard |
| Product ID | 1_month_premium_ios | <app>_<entitlement>_<version> pattern; cannot be reused | Created with the Web Billing product |
| Duration | 1 Month | Base plan: 1 month | Monthly subscription |
| Renewal | Subscription | Auto-renewing base plan | Subscription |
| Price | Pricing tier, e.g. Tier 3 | Set in base plan | Set in product details |
| Entitlement | premium | premium | premium |
| Extra required | Localized names, screenshot, description; submit for review | Service credentials connection | Stripe account connected |
Values reflect the walkthrough example; console labels and required fields can change, so verify against current store documentation.
Frequently asked questions
Why can't I run this in Expo Go?
react-native-purchases includes native code, and Expo Go does not load custom native modules. Use a development build so the native purchase module is compiled into the app.
Do I need a separate entitlement for web?
No. The setup links the iOS, Android and web products to the same entitlement, such as premium. The app checks the entitlement, so access follows the customer across platforms.
Can I reuse a Google Play product ID after deleting it?
No. Product IDs cannot be used again even after deletion, which is why a structured naming pattern is recommended.
What does purchasePackage return, and how do I know access was granted?
The supplied hook calls Purchases.purchasePackage(pkg). Access is confirmed separately through useCustomerInfo and hasActiveEntitlement, which checks customerInfo.entitlements.active for the entitlement ID.