One npm install
An npm alias installs @revenuedot/react-native-purchases 10.10.2 as react-native-purchases.
SDK
To add in-app purchases to a React Native or Expo app, install the RevenueDot SDK from npm under the name react-native-purchases and call Purchases.configure with your app's appl_ or goog_ key. RevenueDot checks each purchase with the App Store or Google Play and keeps each customer's access in sync. Expo Go and the web buy with a Test Store key. Cloud is free until $10,000 a month.
Free until your app makes $10,000 a month. Switching from RevenueCat? Change one line.
An npm alias installs @revenuedot/react-native-purchases 10.10.2 as react-native-purchases.
A test_ key buys in Expo Go and on the web, with no store account.
Installed into the Expo example and run on the web, it loads offerings, buys through the Test Store and turns pro active.
RevenueDot's react-native-purchases-ui shows paywalls you design in the dashboard.
Steps
Start for free on RevenueDot Cloud. Add a Test Store app and copy its test_ key. Add an App Store app and a Google Play app when you are ready to sell.
Add the App Store In-App Purchase key and the Google Play service account. See App Store and Google Play.
Add products, an entitlement such as pro (the access your app checks) and a current offering (the products your paywall shows).
Run the npm install below, then call Purchases.configure at app start with the appl_ or goog_ key for the platform. On Cloud the SDK already points at RevenueDot, so your key is the only setting.
Call Purchases.purchasePackage(pkg) and read customerInfo.entitlements.active["pro"].
Use the test_ key and tap Test valid purchase in the dialog. See the Test Store.
Install
The RevenueDot SDK is built from RevenueCat's open-source SDK (MIT license). The npm alias installs it under the name react-native-purchases, so your code imports that package and calls Purchases. It sends every request to RevenueDot and needs no RevenueCat account.
For real App Store and Google Play purchases, build a development build or a production app, as with any native purchase library. Expo Go and the web run the SDK in browser mode with a test_ key.
Self-hosting? Call await Purchases.setProxyURL(...) with your server's URL before configure, and leave entitlement verification at its default, DISABLED, because your server signs with its own key. See Trusted Entitlements.
npm install react-native-purchases@npm:@revenuedot/react-native-purchases@10.10.2
# Paywalls, optional
npm install react-native-purchases-ui@npm:@revenuedot/react-native-purchases-ui@10.10.2
// App start
import { Platform } from "react-native";
import Purchases from "react-native-purchases";
Purchases.configure({ apiKey: Platform.OS === "ios" ? "appl_..." : "goog_..." }); TypeScript
const customerInfo = await Purchases.getCustomerInfo();
const isPro = customerInfo.entitlements.active["pro"] !== undefined;
const offerings = await Purchases.getOfferings();
const pkg = offerings.current?.availablePackages[0];
if (pkg) {
try {
const { customerInfo: after } = await Purchases.purchasePackage(pkg);
const nowPro = after.entitlements.active["pro"] !== undefined;
} catch (e: any) {
if (!e.userCancelled) throw e;
}
} Notes
test_ and rcb_ keys. RevenueDot accepts test_ only today.test_ keys in debug builds only. Ship with appl_ and goog_ keys.Switch
If your app already ships RevenueCat's react-native-purchases, you can keep it. Await Purchases.setProxyURL before configure. Entitlement verification is already DISABLED by default in this SDK, which is what RevenueDot needs. Then call Purchases.syncPurchasesForResult() once on the first launch of the update, so current subscribers keep access. The full plan is in Migrate from RevenueCat.
setProxyURL returns a promise, so await it before configure.INFORMATIONAL or ENFORCED setting. ENFORCED would fail every request, because RevenueDot cannot sign with RevenueCat's key.appl_ and goog_ keys working, so builds you already shipped keep their keys.import { Platform } from "react-native";
import Purchases from "react-native-purchases";
await Purchases.setProxyURL("https://api.revenuedot.app");
Purchases.configure({
apiKey: Platform.OS === "ios" ? "appl_..." : "goog_...",
// Leave entitlementVerificationMode unset: DISABLED is the React Native default.
});
// Once, on the first launch of this update
await Purchases.syncPurchasesForResult(); FAQ
No. The RevenueDot SDK is built from RevenueCat's open-source React Native SDK under the MIT license, but every request goes to RevenueDot. Create a free RevenueDot Cloud project, copy your app's keys and pass them to Purchases.configure.
Install the RevenueDot SDK from npm under the name react-native-purchases, configure it with your appl_ or goog_ key, then call getOfferings and purchasePackage. RevenueDot checks each purchase with the store and keeps the customer's entitlements in sync.
Yes. Expo Go and the web run the SDK in browser mode with a test_ key. For real store purchases you build a development or production app, as with any native purchase library, and use your appl_ and goog_ keys.
Yes. Create a Test Store app and use its test_ key. In Expo Go or on the web, tap a package and choose Test valid purchase.
The npm alias installs @revenuedot/react-native-purchases under the name react-native-purchases. Your code imports Purchases from react-native-purchases, and the native builds come from RevenueDot's packages on CocoaPods and Maven Central.
Await Purchases.setProxyURL("https://api.revenuedot.app") before configure and call syncPurchasesForResult once after the update. Verification is already DISABLED by default, which is what RevenueDot needs.
Get started
Building and testing are free, and you can test your first purchase before you have a store account. Pro costs $0 until your apps make $10,000 a month.
Already have an account? Sign in · Switching from RevenueCat? Change one line