Skip to main content
Question

About RevenueCat Web SDK


Forum|alt.badge.img

Does the web SDK does not support in-app purchases, user management, or most of the methods ?

This post has been closed for comments

3 replies

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 82 replies
  • June 26, 2025

Hey ​@arnav-raj-f8b666 ,

The Web SDK does support in-app purchases and user management, but it's designed specifically for the web (not for native app stores like Apple or Google Play).

What it supports:

  • In-app purchases via Stripe: full checkout flow using Stripe Elements, Apple Pay, etc.

  • User management: supports both anonymous and identified users via appUserId, with methods like configure(), changeUser(), and getCustomerInfo()

  • Core SDK methods: includes getOfferings(), purchase(), and entitlement checks via getCustomerInfo()

What it doesn’t support:

  • Native store integrations: no App Store or Play Store purchases

  • restorePurchases(): not needed on web, use getCustomerInfo() instead

  • Receipt validation: not applicable; Stripe handles payment status directly

These differences are by design, to reflect the SDK’s web-first architecture in comparison to the mobile ones! 

More info: Web SDK

Best,


Forum|alt.badge.img

I am not able to use configure(). I have installed the latest SDK 1.6.0
npm list @revenuecat/purchases-js
vite-react-typescript-starter@0.0.0 /Users/Downloads/project
└── @revenuecat/purchases-js@1.6.0

 

Below is my code snippet

import * as Purchases from '@revenuecat/purchases-js';

import { PurchasesOffering, PurchasesPackage, CustomerInfo, PurchasesError } from '@revenuecat/purchases-js';

 

// RevenueCat configuration

const REVENUECAT_PUBLIC_KEY = 'revenuecatpublickey';

 

// RevenueCat REST API configuration

const REVENUECAT_API_BASE = 'https://api.revenuecat.com/v1';

const REVENUECAT_PROJECT_ID = 'myprojectid'; // I have replaced this with my actual projectid

const REVENUECAT_API_KEY = 'revenuecatapikey'; // Using the provided API key

 

// Entitlement configuration

const PREMIUM_ENTITLEMENT_ID = 'myentitlementid'; // Your RevenueCat entitlement ID

 

// Initialize RevenueCat

let isInitialized = false;

 

export async function initializeRevenueCat(userId?: string): Promise<void> {

if (isInitialized) return;

 

try {

await Purchases.configure(REVENUECAT_PUBLIC_KEY, userId);

isInitialized = true;

console.log('RevenueCat initialized successfully with user:', userId);


guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 82 replies
  • July 3, 2025

Hey ​@arnav-raj-f8b666 ,

You're using version 1.6.0, but the syntax you're using (Purchases.configure(apiKey, userId)) was only added in version 1.7.0.

You could either update to latest version (recommended) and then your

  await Purchases.configure(REVENUECAT_PUBLIC_KEY, userId);

will work, or you could use the syntax for v1.6.0:

await Purchases.configure({
    apiKey: REVENUECAT_PUBLIC_KEY,
    appUserId: userId
  });

That should fix the issue you’re seeing, but let me know if something else is still not working!

Best,


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings