MCPcopy Index your code
hub / github.com/RevenueCat/react-native-purchases

github.com/RevenueCat/react-native-purchases @10.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 10.4.1 ↗ · + Follow
828 symbols 1,724 edges 165 files 99 documented · 12% 2 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

😻 In-App Subscriptions Made Easy 😻

License

RevenueCat is a powerful, reliable, and free to use in-app purchase server with cross-platform support. Our open-source framework provides a backend and a wrapper around StoreKit, Google Play Billing and RevenueCat Web Billing to make implementing in-app purchases and subscriptions easy.

Whether you are building a new app or already have millions of customers, you can use RevenueCat to:

  • Fetch products, make purchases, and check subscription status with our native SDKs.
  • Host and configure products remotely from our dashboard.
  • Analyze the most important metrics for your app business in one place.
  • See customer transaction histories, chart lifetime value, and grant promotional subscriptions.
  • Get notified of real-time events through webhooks.
  • Send enriched purchase events to analytics and attribution tools with our easy integrations.

Sign up to get started for free.

React Native Purchases

React Native Purchases is the client for the RevenueCat subscription and purchase tracking system. It is an open source framework that provides a wrapper around StoreKit, Google Play Billing, RevenueCat Web Billing and the RevenueCat backend to make implementing in-app purchases in React Native easy.

Migrating from React-Native Purchases v4 to v5

RevenueCat SDK Features

RevenueCat
Server-side receipt validation
➡️ Webhooks - enhanced server-to-server communication with events for purchases, renewals, cancellations, and more
🎯 Subscription status tracking - know whether a user is subscribed whether they're on iOS, Android or web
📊 Analytics - automatic calculation of metrics like conversion, mrr, and churn
📝 Online documentation and SDK reference up to date
🔀 Integrations - over a dozen integrations to easily send purchase data where you need it
💯 Well maintained - frequent releases
📮 Great support - Help Center

Getting Started

For more detailed information, you can view our complete documentation at docs.revenuecat.com.

Please follow the Quickstart Guide for more information on how to install the SDK.

Or view our React Native sample app: - MagicWeather

Requirements

The minimum React Native version this SDK requires is 0.73.0. In Android, minimum Kotlin version is 1.8.0.

SDK Reference

Our full SDK reference can be found here.


Installation

Expo supports in-app payments and is compatible with react-native-purchases. To use the SDK, create a new project and set up a development build. Development builds enable native code and provide a complete environment for testing purchases.

$ npx expo install react-native-purchases

In Expo Go, the SDK automatically runs in Preview API Mode, replacing native calls with JavaScript mocks so your app loads without errors. Real purchases, however, require a development build.

Using development builds

To fully test in-app purchases, you’ll need to create a custom development build with EAS. This ensures that all native dependencies, including react-native-purchases, are properly included.

Extension points exported contracts — how you extend this code

ConfigurationsByStore (Interface)
(no doc)
react-native-purchases-store-galaxy/src/index.ts
PurchaseLogic (Interface)
(no doc)
react-native-purchases-ui/src/index.tsx
TestOptions (Interface)
(no doc)
react-native-purchases-ui/__tests__/customVariables.test.ts
SyncPurchasesResult (Interface)
(no doc)
src/purchases.ts
SimulatedPurchaseData (Interface)
(no doc)
src/browser/simulatedstore/offeringsLoader.ts
CustomVariablesEditorProps (Interface)
(no doc)
examples/purchaseTesterTypescript/app/components/CustomVariablesEditor.tsx
CustomVariablesContextType (Interface)
(no doc)
examples/purchaseTesterExpo/components/CustomVariablesContext.tsx
PresentPaywallParams (Interface)
(no doc)
react-native-purchases-ui/src/index.tsx

Core symbols most depended-on inside this repo

throwIfNotConfigured
called by 75
src/purchases.ts
methodNotSupportedOnWeb
called by 56
src/browser/utils.ts
configure
called by 53
src/purchases.ts
callMethod
called by 52
examples/purchaseTesterExpo/app/(tabs)/index.tsx
showCustomerCenterNotification
called by 20
examples/purchaseTesterTypescript/app/screens/HomeScreen.tsx
showCustomerCenterNotification
called by 19
examples/purchaseTesterExpo/app/(tabs)/index.tsx
presentPaywall
called by 15
react-native-purchases-ui/src/index.tsx
purchasePackage
called by 15
src/purchases.ts

Shape

Function 382
Method 364
Class 50
Interface 31
Enum 1

Languages

TypeScript63%
Kotlin26%
Java11%

Modules by API surface

src/purchases.ts112 symbols
android/src/main/java/com/revenuecat/purchases/react/RNPurchasesModule.java82 symbols
apitesters/paywalls.tsx32 symbols
react-native-purchases-ui/apitesters/paywalls.tsx31 symbols
react-native-purchases-ui/android/src/main/java/com/revenuecat/purchases/react/ui/BasePaywallViewManager.kt28 symbols
react-native-purchases-ui/src/index.tsx25 symbols
apitesters/purchases.ts23 symbols
apitesters/offerings.ts22 symbols
examples/purchaseTesterTypescript/app/screens/HomeScreen.tsx21 symbols
react-native-purchases-ui/android/src/main/java/com/revenuecat/purchases/react/ui/CustomerCenterViewManager.kt19 symbols
react-native-purchases-ui/android/src/main/java/com/revenuecat/purchases/react/ui/RNCustomerCenterModule.kt17 symbols
examples/purchaseTesterTypescript/app/screens/CustomerCenterScreen.tsx13 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add react-native-purchases \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact