Guidelines for using RevenueCat to integrate payments in mobile apps and any subsequent CRUD operations related to any RevenueCat entities
react-native-purchases. Always download the version that is compatible with the version of React Native/Expo used in the app.These packages must be installed in the workspace root package.json:
react-native-purchases - Official client-side SDK for React Native. This should be used on the client.replit-revenuecat-v2 - SDK for RevenueCat's REST API. This should NEVER be used on the client, only for server-side scripts.If they are not installed, use npm to install them: $ cd /home/runner/workspace && npm install <packages>
The RevenueCat integration must be connected to the repl. This is necessary as the integration creates an authenticated client for RevenueCat accessible via a function . You can do this by proposing the integration. Reference the skill if necessary.
getUncachableRevenueCatClientintegrationsYou are required to ensure these requirements are met before setting up or using RevenueCat.
scripts/ at the workspace root (e.g., scripts/seedRevenueCat.ts)npx tsx scripts/<script>.tsclient/Reference files use these terms. Map them to these concrete paths.
offerings.current on the client for the default offering.
Do NOT Create Product Tables or Maintain Any Other Source of Truth for In-App Purchases
Bad — creates duplicate product storage:
export const products = pgTable("products", {
id: varchar("id").primaryKey(),
name: text("name"),
price: integer("price"),
// ... custom fields
});
Correct Approach:
Key Principle "If it exists in RevenueCat, it belongs in RevenueCat"
Before writing code, identify whether any reference below applies to the task. If it does, read it first.
replit-revenuecat-v2 package