SDK

Web subscriptions with purchases-js: test purchases and Stripe Checkout

To use purchases-js with RevenueDot, pass httpConfig: { proxyURL: "https://api.revenuedot.app" } to Purchases.configure and turn off analytics events. Only Test Store (test_) keys buy through purchases-js today. For real web payments, send buyers to a RevenueDot purchase link or funnel, which runs Stripe Checkout in your own Stripe account.

Free up to $10,000 a month in tracked revenue. Works with the RevenueCat SDK you already ship.

The Web page in the RevenueDot dashboard showing the Stripe provider and the four-step setup checklist for web billing

One config key

httpConfig.proxyURL points purchases-js at RevenueDot.

Fork tested end to end

The web fork ran configure, offerings, a Test Store purchase and the pro entitlement against a real server.

Real payments on Stripe

Purchase links and funnels charge on your own Stripe account.

One customer

A web buyer and an app user share entitlements through the same app user ID.

Steps

How to add web subscriptions with purchases-js and RevenueDot

  1. 01

    Create a free Cloud project and a Test Store app

    Start free on Cloud, add a Test Store app and copy its test_ key.

  2. 02

    Create products and an offering

    Add a product with a duration and a Test Store price, a pro entitlement and a current offering.

  3. 03

    Configure purchases-js with the proxy URL

    Pass httpConfig.proxyURL and flags: { collectAnalyticsEvents: false }, as in the code below. The URL must not end with a slash.

  4. 04

    Buy and check the entitlement

    Call purchases.purchase({ rcPackage }). With a test_ key it opens the Test Store modal. Read customerInfo.entitlements.active.

  5. 05

    Take real payments with a purchase link

    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.

TypeScript

The purchases-js proxy URL change

Use your RevenueDot test_ key as apiKey today, and add flags: { collectAnalyticsEvents: false } so the stock SDK does not send analytics to RevenueCat. The SDK needs an appUserId. Pass your signed-in user's ID.

Point the SDK at RevenueDotTypeScript
Purchases.configure({
  apiKey: "test_...",
  appUserId,
  httpConfig: { proxyURL: "https://api.revenuedot.app" },
});

TypeScript

Check an entitlement and make a test purchase

RevenueCat's API, unchangedTypeScript
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;
}

Fork

The RevenueDot fork package for the web

The fork lives at github.com/revenuedot/purchases-js. It sends analytics events to the proxy URL too, and its checkout reads Secure checkout by RevenueDot. It is not on npm yet (checked October 2026). The planned install keeps your imports through an alias. Until then you can build a tarball from the revenuedot/main-patches branch.

Planned fork installpackage.json
// package.json
"@revenuecat/purchases-js": "npm:@revenuedot/purchases-js@<version>"

Honest limits

Which web purchases work today

Purchase typeWorks with RevenueDotHow
Test Store (test_ key)Yespurchases-js opens a Test Store modal
Stripe on your own accountYesRevenueDot purchase link or funnel, or your own checkout posted to the receipts endpoint
RevenueCat Web Billing (rcb_)NoRevenueDot answers error 7662. Keep those subscriptions on RevenueCat
Paddle (pdl_)NoRevenueDot answers error 7662

Run a Stripe test-mode purchase before you go live.

FAQ

Web (purchases-js): questions people ask

Can purchases-js use a custom backend?

Yes. Pass httpConfig: { proxyURL } to Purchases.configure with a server that implements the SDK API. With RevenueDot, only Test Store test_ keys buy through purchases-js today. Real web payments use RevenueDot's Stripe-backed purchase links and funnels.

How do I take real subscription payments on the web with RevenueDot?

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.

Does RevenueDot support RevenueCat Web Billing keys?

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.

Why turn off collectAnalyticsEvents?

The stock purchases-js sends analytics events to RevenueCat even with a proxy URL. Turning the flag off keeps all traffic on your server. The RevenueDot fork sends them to the proxy URL, so you can leave it on there.

Get started

Run subscriptions without the revenue share.

Start free on RevenueDot Cloud, free up to $10,000 a month in tracked revenue, or move an existing RevenueCat app with one line of code.

Already have an account? Sign in · Prefer your own servers? Self-host free