How do I make a first purchase with RevenueDot in 5 minutes?

Create an account on RevenueDot Cloud, add a Test Store app with one product and one entitlement, make a test purchase from the dashboard, then install the RevenueDot SDK in your app and pass it your key. You need no server, no App Store account and no Google Play account. Building and testing are free, no card needed. Add a card when you go live; Pro costs $0 until your apps make $10,000 a month.

Watch the 1:18 walkthrough, or on YouTube. Watch page.

1. Create an account#

  1. Open app.revenuedot.app/signup.
  2. Enter your email, a password of at least 8 characters, and a name for your first project. A project holds your apps, products and customers.
  3. Open the email from RevenueDot and click the link to confirm your address. The link works for 24 hours. Cloud needs a confirmed address before you can create secret API keys or invite teammates.

The dashboard opens on Overview, with a six-step setup checklist. To sign in later, use app.revenuedot.app/login.

2. Add a Test Store app, a product and an entitlement#

The Test Store is RevenueDot's built-in store for testing. Its purchases unlock entitlements and send webhooks like real ones, and they are always sandbox data.

Do it in the dashboard:

  1. Apps: add an app of type Test Store.
  2. Product catalog, Products: add a product for the Test Store app, for example pro_monthly, a subscription that lasts one month.
  3. Product catalog, Entitlements: add an entitlement called pro and attach the product. Your app checks this entitlement to unlock paid features.
  4. Product catalog, Offerings: add an offering called default, give it a package with the product, and make it current. The SDK reads this offering to build the paywall.

Or seed all of it with one script. It needs curl and jq, and it uses only the public API. It signs in with the account you just made, then adds a Test Store app, three products, a pro entitlement, a default offering and a secret key. Run it after you confirm your email, because Cloud creates secret keys only for confirmed accounts:

Shell
curl -fsSLO https://raw.githubusercontent.com/revenuedot/examples/main/selfhost/docker-compose/seed.sh
RD_URL=https://api.revenuedot.app RD_EMAIL=you@example.com RD_PASSWORD='your password' bash seed.sh

The script prints the project id, the Test Store key (test_...) and a secret key (sk_...). Keep the secret key on your server only. Sign in to the dashboard at app.revenuedot.app/login, even though the script prints the API address.

3. Make a test purchase from the dashboard#

On Overview, click Make a test purchase. Keep the app user ID test_user_1, pick the product and click Purchase.

The purchase runs through the same steps as a real one. Open Customers and click test_user_1: the customer has the pro entitlement, active for one month, and the purchase events are listed.

4. Install the RevenueDot SDK and pass your key#

Copy the Test Store key (it starts with test_) from API keys. Install the RevenueDot SDK for your platform and pass the key to configure. On RevenueDot Cloud that is all the setup, because the SDK already sends its requests to https://api.revenuedot.app.

The RevenueDot SDK is built from RevenueCat's open-source SDK (MIT license), so your code imports RevenueCat and calls Purchases. It sends every request to RevenueDot and needs no RevenueCat account.

iOS. In Xcode, choose File > Add Package Dependencies, enter https://github.com/revenuedot/purchases-ios, pick the exact version 5.91.0-revenuedot and add the RevenueCat product. With CocoaPods, add pod 'RevenueDotPurchases', '5.91.0' instead.

Swift
import RevenueCat

Purchases.configure(withAPIKey: "test_...")

Android. Add the package from Maven Central, then configure the SDK in Application.onCreate().

Kotlin
// build.gradle.kts
implementation("app.revenuedot.purchases:purchases:10.23.3")
Kotlin
Purchases.configure(PurchasesConfiguration.Builder(this, "test_...").build())

React Native and Expo. The npm alias installs the RevenueDot SDK under the name react-native-purchases, so your code imports Purchases from "react-native-purchases".

Shell
npm install react-native-purchases@npm:@revenuedot/react-native-purchases@10.10.2
TypeScript
import Purchases from "react-native-purchases";

Purchases.configure({ apiKey: "test_..." });

Flutter. Add the SDK as a git dependency. The pub.dev names belong to RevenueCat, so the RevenueDot SDK comes from GitHub.

YAML
# pubspec.yaml
dependencies:
  purchases_flutter:
    git:
      url: https://github.com/revenuedot/purchases-flutter.git
      ref: 10.13.2-revenuedot
Dart
import 'package:purchases_flutter/purchases_flutter.dart';

await Purchases.configure(PurchasesConfiguration('test_...'));

The install lines for the web, Capacitor, Kotlin Multiplatform, Unity and Cordova are in the SDK guides. Native SDKs accept test_ keys only in debug builds. Ship with the appl_ and goog_ keys from your App Store and Google Play apps.

The shortest way to see a purchase in an app is the purchases-js web example, which runs in a browser. The second npm install swaps in the RevenueDot SDK for the web through an npm alias, so the example's imports stay as they are. The example reads the server address from VITE_REVENUEDOT_URL.

Shell
git clone https://github.com/revenuedot/examples.git && cd examples/web/purchases-js-vite
npm install
npm install @revenuecat/purchases-js@npm:@revenuedot/purchases-js@1.67.0
printf "VITE_REVENUEDOT_URL=https://api.revenuedot.app\nVITE_REVENUEDOT_API_KEY=test_...\n" > .env.local
npm run dev                    # open http://localhost:5199, click Buy, then "Test valid purchase"

Switching from RevenueCat? Keep the RevenueCat SDK your app already ships. Set its proxy URL to https://api.revenuedot.app before configure, and turn off its response-signature check. See How do I connect my app? and Migrate from RevenueCat.

Give each Test Store product a price in the dashboard (Product catalog, Edit product, Test Store price) so the paywall shows it. A product without one shows 0. Real prices come from the App Store and Google Play. See Test Store.

Run your own server (advanced)#

Most people should use RevenueDot Cloud above. If your company requires its own server, the server on Cloud is the same open-source code. You need Docker with Compose v2, plus git, curl and jq. Most of the 5 minutes is the first image build.

1. Start RevenueDot#

Shell
git clone https://github.com/revenuedot/revenuedot.git
cd revenuedot
cp .env.example .env          # sets POSTGRES_PASSWORD; change it before the first start
docker compose up -d          # pulls ghcr.io/revenuedot/revenuedot, starts the server and Postgres
curl http://localhost:8787/v1/health
JSON
{"status":"ok"}

One container serves the SDK API, the REST API and the dashboard on port 8787. To use another host port, set REVENUEDOT_PORT=8797 in .env. The dashboard is at http://localhost:8787/login; the bare / path returns a small JSON document.

2. Seed a project with a Test Store app#

The seed script uses only the public API. It creates a dashboard account and project, a Test Store app, three products, a pro entitlement, a default offering and a secret key.

Shell
curl -fsSLO https://raw.githubusercontent.com/revenuedot/examples/main/selfhost/docker-compose/seed.sh
bash seed.sh                   # RD_URL=http://localhost:8797 bash seed.sh for another port
Text
RevenueDot is seeded.
  Dashboard        http://localhost:8787  (sign in as dev@example.com)
  Project id       projqhf9p5jb
  Test Store key   test_960d2b3001bac439c7a73d7f4214514c      <- the SDK's API key; the SDK's proxy URL is http://localhost:8787
  Secret key       sk_8b8dc12a743e51f4de759b0b9c6d372e6d25d32fe7280672    <- server-side only (REST API, backend checks)
Try it:
  curl -s -H "Authorization: Bearer test_960d2b3001bac439c7a73d7f4214514c" http://localhost:8787/v1/subscribers/user_1/offerings

Save the two keys for the next steps:

Shell
export TEST_KEY=test_...   # the Test Store key printed above
export SECRET_KEY=sk_...   # the secret key printed above

To see what the script does, or to do it by hand, read the seed script. Each step is one REST API v2 call. You can also do everything in the dashboard.

3. Ask for offerings, as the SDK does#

Shell
curl -s -H "Authorization: Bearer $TEST_KEY" http://localhost:8787/v1/subscribers/user_1/offerings
JSON
{"current_offering_id":"default","offerings":[{"description":"Standard plans","identifier":"default","metadata":null,"packages":[{"identifier":"$rc_monthly","platform_product_identifier":"pro_monthly"},{"identifier":"$rc_annual","platform_product_identifier":"pro_annual"},{"identifier":"$rc_lifetime","platform_product_identifier":"pro_lifetime"}]}]}

4. Make a Test Store purchase#

In an app, the SDK makes this call for you after the user confirms the Test Store dialog. The Test Store accepts any fetch_token of the form test_<purchase time in ms>_<id>.

Shell
curl -s http://localhost:8787/v1/receipts \
  -H "Authorization: Bearer $TEST_KEY" -H "Content-Type: application/json" \
  -d "{\"app_user_id\":\"user_1\",\"fetch_token\":\"test_$(date +%s)000_quickstart\",\"product_id\":\"pro_monthly\",\"price\":9.99,\"currency\":\"USD\"}"

The answer is the customer's info. pro is now in entitlements, active until one month from now:

JSON
{
  "request_date": "2026-09-30T19:49:29Z",
  "subscriber": {
    "entitlements": {
      "pro": { "expires_date": "2026-10-30T19:49:29Z", "grace_period_expires_date": null, "product_identifier": "pro_monthly", "purchase_date": "2026-09-30T19:49:29Z" }
    },
    "original_app_user_id": "user_1",
    "subscriptions": {
      "pro_monthly": { "store": "test_store", "is_sandbox": true, "period_type": "normal", "expires_date": "2026-10-30T19:49:29Z", "...": "..." }
    }
  },
  "purchased_products": { "pro_monthly": { "should_consume": false } }
}

Check the same customer through the REST API with the secret key:

Shell
curl -s -H "Authorization: Bearer $SECRET_KEY" \
  "http://localhost:8787/v2/projects/<project id>/customers/user_1/active_entitlements"

The same curl calls work on Cloud: replace http://localhost:8787 with https://api.revenuedot.app.

5. Set the SDK's proxy URL to your server#

Install the RevenueDot SDK as in step 4 above. Then add one line of setup before configure: the SDK's proxy URL, which is your server's address, for example http://localhost:8787. Then set entitlement verification to disabled. The RevenueDot SDK trusts RevenueDot Cloud's response-signing key, and your server signs with its own key. iOS and Android default to informational mode, so the code below sets disabled. React Native and Flutter already default to disabled. See Trusted Entitlements.

Swift
// iOS: set your server's address before configure.
Purchases.proxyURL = URL(string: "http://localhost:8787")!
Purchases.configure(with: Configuration.Builder(withAPIKey: "test_...").with(entitlementVerificationMode: .disabled).build())
Kotlin
// Android: the emulator reaches your computer at 10.0.2.2.
Purchases.proxyURL = URL("http://10.0.2.2:8787")
Purchases.configure(PurchasesConfiguration.Builder(this, "test_...").entitlementVerificationMode(EntitlementVerificationMode.DISABLED).build())
TypeScript
// React Native / Expo: verification is already disabled by default.
await Purchases.setProxyURL("http://localhost:8787");
Purchases.configure({ apiKey: "test_..." });
Dart
// Flutter: verification is already disabled by default.
await Purchases.setProxyURL('http://localhost:8787');
await Purchases.configure(PurchasesConfiguration('test_...'));

On the Android emulator, use http://10.0.2.2:8787, because the emulator reaches your computer at 10.0.2.2. In the purchases-js example, set VITE_REVENUEDOT_URL=http://localhost:8787. The same lines work with the RevenueCat SDK if your app already ships it.

To run it for real customers, read Self-hosting and Going to production.

Next steps#

Edit this page on GitHub ↗ View as Markdown Last updated