SDK

In-app purchases and subscriptions for Unity games

To use RevenueDot in a Unity game, open the GameObject with the Purchases component, set the Proxy URL field to https://api.revenuedot.app and set Entitlement Verification Mode to Disabled. Unity has no public SetProxyURL method, so the Inspector field is the only way. The component applies it before it configures the SDK, also when you configure from code.

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

Inspector setting

Proxy URL sits under Advanced on the Purchases component.

Works with runtime setup

The field still applies when you configure from a script.

iOS and Android

Purchases run on a device or simulator. The Editor uses a no-op wrapper.

Namespaces stay

using RevenueCat; keeps working with the planned fork.

Steps

How to add subscriptions to a Unity game with RevenueDot

  1. 01

    Create a free Cloud project

    Start free on 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, a pro entitlement and a current offering.

  3. 03

    Set the Inspector fields

    On the Purchases component set Proxy URL to https://api.revenuedot.app, Entitlement Verification Mode to Disabled, and the Apple and Google API keys to your appl_ and goog_ keys.

  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.

Inspector

The Unity proxy URL setting

Proxy URL field and verification in the InspectorInspector
// Inspector: Purchases component → Proxy URL
// https://api.revenuedot.app
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

C#

Configure at runtime and make a purchase

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_...")
            .SetEntitlementVerificationMode(Purchases.EntitlementVerificationMode.Disabled)
            .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");
            });
        });
    }
}

Fork

The RevenueDot fork package for Unity

The fork lives at github.com/revenuedot/purchases-unity. C# namespaces and assembly names stay the same. It is not published yet (checked October 2026), and it cannot build a working app until its native dependencies are published, so use the Inspector setting today.

Planned fork installterminal
// OpenUPM
openupm add com.revenuedot.purchases-unity

Notes

Unity details worth knowing

  • Editor: the SDK uses a no-op wrapper in the Unity Editor and makes no requests. Test on a device or simulator.
  • Migrating from RevenueCat? Call GetComponent<Purchases>().SyncPurchases() once on the first launch of the update.
  • Test Store keys work in debug builds only.
  • Status: there is no Unity example app yet.

FAQ

Unity: questions people ask

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

Add the RevenueCat Unity plugin, set your store keys on the Purchases component, then fetch offerings and call PurchasePackage. A backend checks the receipts. With RevenueDot you fill the Proxy URL field and set verification to Disabled.

Where is the proxy URL in the Unity SDK?

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.

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.

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