SDK

Unity in-app purchases and subscriptions with the RevenueDot plugin

To add in-app purchases to a Unity game, install the RevenueDot plugin with openupm add com.revenuedot.purchases-unity and paste your app's appl_ and goog_ keys on the Purchases component. RevenueDot checks each purchase with the App Store or Google Play and keeps each player's access in sync. Purchases run on iOS and Android devices and simulators. RevenueDot Cloud is free until your game makes $10,000 a month.

Free until your app makes $10,000 a month. Switching from RevenueCat? Change one line.

OpenUPM or git

com.revenuedot.purchases-unity 9.11.1 on OpenUPM, or the git tag 9.11.1-revenuedot.

Inspector setup

Paste your keys on the Purchases component. RevenueDot Cloud is the default server.

Runtime setup too

Check Use Runtime Setup and call Configure from a script.

Test on a device

The Editor uses a no-op wrapper, so buy on an iOS or Android device or simulator.

Steps

How to add subscriptions to a Unity game with RevenueDot

  1. 01

    Create a free Cloud project

    Start for free on RevenueDot Cloud and add an App Store app and a Google Play app, or a Test Store app for a first run.

  2. 02

    Connect the stores and create the catalog

    Add credentials (App Store, Google Play), then products, an entitlement such as pro (the access your game checks) and a current offering (the products your paywall shows).

  3. 03

    Install the RevenueDot plugin and configure it with your key

    Run openupm add com.revenuedot.purchases-unity. On the Purchases component, paste your appl_ and goog_ keys into the Apple and Google API key fields. RevenueDot Cloud is the default server, so the keys are the only setting.

  4. 04

    Configure from a script if you use runtime setup

    Check Use Runtime Setup and call Configure from a script that runs after Purchases.Start(), as in the code below.

  5. 05

    Buy and check the entitlement

    Call PurchasePackage and read customerInfo.Entitlements.Active. See the Test Store to buy without store accounts.

Install

Install the RevenueDot Unity plugin and configure it with your key

The RevenueDot plugin is built from RevenueCat's open-source Unity plugin (MIT license), so your scripts use the Purchases component and the RevenueCat namespace. It sends every request to RevenueDot and needs no RevenueCat account.

The External Dependency Manager pulls RevenueDot's native iOS and Android packages. The paywall package (RevenueCatUI folder) installs from git.

Self-hosting? Set the Proxy URL field under Advanced to your server and Entitlement Verification Mode to Disabled, because your server signs with its own key. Unity has no public SetProxyURL method, so the field is the only way. See Trusted Entitlements.

Install, then paste your keysTerminal and Inspector
# Install with OpenUPM
openupm add com.revenuedot.purchases-unity
# Or Package Manager > Add package from git URL:
# https://github.com/revenuedot/purchases-unity.git?path=RevenueCat#9.11.1-revenuedot

// Inspector: Purchases component → API keys
// Paste your app's key; RevenueDot Cloud is the default server.

C#

Configure at runtime, then buy a package

The script must run after Purchases.Start(), which creates the native wrapper. Calling Configure before it throws a NullReferenceException. [DefaultExecutionOrder(100)] makes Unity call your Start() after it.

Runs after Purchases.Start()C#
using UnityEngine;

[DefaultExecutionOrder(100)]
[RequireComponent(typeof(Purchases))]
public class Store : MonoBehaviour
{
    void Start()
    {
        var purchases = GetComponent<Purchases>();
        purchases.Configure(Purchases.PurchasesConfiguration.Builder.Init("appl_...").Build());

        purchases.GetOfferings((offerings, error) =>
        {
            if (error != null || offerings.Current == null) return;
            purchases.PurchasePackage(offerings.Current.AvailablePackages[0], result =>
            {
                if (result.UserCancelled || result.Error != null) return;
                bool nowPro = result.CustomerInfo.Entitlements.Active.ContainsKey("pro");
            });
        });
    }
}

Notes

Check these Unity details before you ship

  • Editor: the SDK uses a no-op wrapper in the Unity Editor and makes no requests. Test on a device or simulator.
  • Test Store keys work in debug builds only. Ship with appl_ and goog_ keys.
  • Status: there is no Unity example app yet, and the RevenueDot package has not been run in the Unity Editor yet.

Switch

Switching from RevenueCat? Keep your Unity plugin and set one field

If your game already ships RevenueCat's Unity plugin, you can keep it. On the Purchases component, set Proxy URL under Advanced to https://api.revenuedot.app and Entitlement Verification Mode to Disabled. The component applies the field before it configures the SDK, also with runtime setup. Then call SyncPurchases() once on the first launch of the update, so current players keep access. The full plan is in Migrate from RevenueCat.

Sync once after the updateC#
// Once, on the first launch of this update
GetComponent<Purchases>().SyncPurchases();
Inspector fieldBeforeAfter
Proxy URL (under Advanced)emptyhttps://api.revenuedot.app
Entitlement Verification ModeInformationalDisabled
Revenue Cat API Key Apple and Googleyour keysappl_ and goog_ keys from RevenueDot, or your RevenueCat keys if the importer kept them

FAQ

Unity: questions people ask

Do I need a RevenueCat account to use the RevenueDot Unity plugin?

No. The RevenueDot plugin is built from RevenueCat's open-source Unity plugin under the MIT license, but every request goes to RevenueDot. Create a free RevenueDot Cloud project, copy your app's keys and paste them on the Purchases component.

How do I add in-app purchases to a Unity game?

Install the RevenueDot plugin from OpenUPM, paste your appl_ and goog_ keys on the Purchases component, then fetch offerings and call PurchasePackage. RevenueDot checks each purchase with the App Store or Google Play and keeps the player's entitlements in sync.

Why does Configure throw a NullReferenceException?

Your script ran before Purchases.Start(), which creates the native wrapper. Add [DefaultExecutionOrder(100)] to your script so Unity calls your Start() after the Purchases component's.

Can I test Unity purchases in the Editor?

No. In the Editor the SDK uses a no-op wrapper and makes no requests. Run on an iOS or Android device or simulator, with a Test Store key in a debug build if you have no store account.

Where is the proxy URL in RevenueCat's Unity plugin?

In the Inspector, on the Purchases component, under Advanced. Unity has no public SetProxyURL method. The component applies the field before it configures the SDK, also when you use runtime setup.

Get started

Start selling subscriptions in your app today.

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