One npm package
@revenuedot/purchases-js 1.67.0, imported as { Purchases }.
SDK
To add web subscriptions, install @revenuedot/purchases-js and call Purchases.configure with your app's key and the signed-in user's ID. Today only Test Store (test_) keys buy through the web SDK. For real web payments, send buyers to a RevenueDot purchase link or funnel, which runs Stripe Checkout in your own Stripe account. Web buyers and app users share access through the same app user ID.
Free until your app makes $10,000 a month. Switching from RevenueCat? Change one line.
@revenuedot/purchases-js 1.67.0, imported as { Purchases }.
The web SDK ran configure, offerings, a Test Store purchase and the pro entitlement against a real server.
Purchase links and funnels charge on your own Stripe account.
A web buyer and an app user share entitlements through the same app user ID.
Steps
Start for free on RevenueDot Cloud, add a Test Store app and copy its test_ key.
Add a product with a duration and a Test Store price, an entitlement such as pro (the access your app checks) and a current offering (the products your paywall shows).
Run npm install @revenuedot/purchases-js@1.67.0, then call Purchases.configure with your test_ key and the user's ID, as in the code below. On Cloud the SDK already points at RevenueDot, so there is nothing else to set.
Call purchases.purchase({ rcPackage }). With a test_ key it opens the Test Store modal. Read customerInfo.entitlements.active.
Connect Stripe, create web products and send buyers to a purchase link with ?app_user_id= set to the same user ID. See web to app.
Install
The RevenueDot web SDK is built from RevenueCat's open-source purchases-js (MIT license), so your code calls Purchases the same way. It sends every request, including analytics events, to RevenueDot and needs no RevenueCat account.
The SDK needs an appUserId. Pass your signed-in user's ID, or one from Purchases.generateRevenueCatAnonymousAppUserId().
Self-hosting? Pass httpConfig: { proxyURL } with your server's URL to configure. The URL must not end with a slash. purchases-js does not check response signatures, so there is no verification setting to change.
npm install @revenuedot/purchases-js@1.67.0
// app.ts
import { Purchases } from "@revenuedot/purchases-js";
const purchases = Purchases.configure({ apiKey: "test_...", appUserId }); TypeScript
const customerInfo = await purchases.getCustomerInfo();
const isPro = "pro" in customerInfo.entitlements.active;
const offerings = await purchases.getOfferings();
const rcPackage = offerings.current?.availablePackages[0];
if (rcPackage) {
const { customerInfo: after } = await purchases.purchase({ rcPackage });
const nowPro = "pro" in after.entitlements.active;
} Honest limits
| Purchase type | Works with RevenueDot | How |
|---|---|---|
Test Store (test_ key) | Yes | purchases-js opens a Test Store modal |
| Stripe on your own account | Yes | RevenueDot purchase link or funnel, or your own checkout posted to the receipts endpoint |
RevenueCat Web Billing (rcb_) | No | RevenueDot answers error 7662. Keep those subscriptions on RevenueCat |
Paddle (pdl_) | No | purchases-js cannot open a Paddle checkout against RevenueDot. Post Paddle purchases from your backend instead |
Run a Stripe test-mode purchase before you go live.
Switch
If your site already uses RevenueCat's @revenuecat/purchases-js, you can keep it. Pass httpConfig.proxyURL to configure, use your RevenueDot test_ key and turn off analytics events. There is no store history to sync on the web, so there is no syncPurchases step. The full plan is in Migrate from RevenueCat.
collectAnalyticsEvents: false. The RevenueDot web SDK sends them to RevenueDot, so you can leave it on there."@revenuecat/purchases-js": "npm:@revenuedot/purchases-js@1.67.0" in package.json.import { Purchases } from "@revenuecat/purchases-js";
const purchases = Purchases.configure({
apiKey: "test_...",
appUserId,
httpConfig: { proxyURL: "https://api.revenuedot.app" }, // no trailing slash
flags: { collectAnalyticsEvents: false },
}); FAQ
No. The RevenueDot web SDK is built from RevenueCat's open-source purchases-js under the MIT license, but every request goes to RevenueDot. Create a free RevenueDot Cloud project, add a Test Store app and pass its test_ key to Purchases.configure.
Not yet. Only Test Store test_ keys buy through purchases-js against RevenueDot today. Real web payments run on RevenueDot's purchase links and funnels, which use Stripe Checkout in your own Stripe account.
Connect your Stripe account with a restricted key, create web products, put them in an offering and share a purchase link or publish a funnel. Buyers pay on Stripe Checkout, and the purchase lands on their app user ID or a redemption link.
Yes. Entitlements belong to the customer, not to one app. Send buyers to a purchase link with app_user_id set to the same ID your app uses, and getCustomerInfo shows the entitlement in the app.
No. Receipts for rcb_ and pdl_ keys answer error 7662. Subscriptions you sell through RevenueCat Web Billing stay on RevenueCat, and new web sales can start on RevenueDot's Stripe checkout.
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