# RevenueCat Bridge

> Setup, API reference, testing, and troubleshooting for the RevenueCat Bridge Unreal Engine plugin.

Markdown version of https://rigbak.com/docs/RevenueCatBridgeDocs, a page of the RevenueCat Bridge documentation. Link that page when citing it.

> **v1.3.0:** `bAutoFetchCustomerInfo` (default on) calls `FetchCustomerInfo()` once after configure. Safety net for cold launches where the native SDK's startup path can leave `CachedCustomerInfo` empty. See [Getting Started](https://rigbak.com/docs/revenuecat-bridge/getting-started#step-3-configure-the-plugin) for the new Behavior settings. For issues or feature requests, contact me.

## Overview

**RevenueCat Bridge** wraps RevenueCat's native Android and iOS SDKs behind a single `UGameInstanceSubsystem`. One instance lives for the entire game session, accessible from Blueprints, C++, or async action nodes.

**Platforms:** Android and iOS at runtime. Win64 editor builds compile and run with stub implementations for iteration.

**Included SDKs:**

- Android: RevenueCat v10.8.0 + purchases-ui v10.8.0 (Gradle, pulled at build time)
- iOS: RevenueCat v5.78.0 + RevenueCatUI v5.78.0 (xcframeworks, bundled)

**Native Paywall UI:** Present RevenueCat's dashboard-configured paywall with a single Blueprint node or C++ call. Design and iterate on your paywall remotely. No app update required.

**Virtual Currencies:** Read coin, gem, or credit balances configured in the RevenueCat dashboard. Show a live wallet and refresh it after each purchase. The client reads balances; grant or spend through the RevenueCat backend.

> The plugin handles client-side purchases only. No server-side logic, no desktop runtime.

---

## Documentation

[Getting Started](https://rigbak.com/docs/revenuecat-bridge/getting-started): Install, configure API keys, and make your first purchase.

[API Reference](https://rigbak.com/docs/revenuecat-bridge/api-reference): Functions, delegates, async actions, structs, and enums.

[Testing & Troubleshooting](https://rigbak.com/docs/revenuecat-bridge/testing): Test plan, edge cases, common issues, and logging.

---

## Typical Flow

Manual Flow Native Paywall

Waiting…

Game Starts

SDK auto-configures from Project Settings

OnConfigured

SDK ready

FetchOfferings()

Fetching from RevenueCat…

PurchasePackage(pkg)

Initiating purchase flow

OnPurchaseCompleted

Result + CustomerInfo

IsEntitlementActive("pro")

→ true — unlock premium content

---

## Architecture

**Architecture** (Content > Plugins > RevenueCatBridge)

Your Game

- Blueprints
- C++
- Blueprint Async Actions

URevenueCatSubsystem

- GameInstanceSubsystem — one instance per session
- Accessible from Blueprints, C++, and async nodes

Platform Bridge

- Android: JNI → Java bridge → callbacks to game thread
- iOS: Obj-C++ → Swift → AsyncTask to game thread
- Win64: Stubs — ConfigureSDK fires OnConfigured

RevenueCat SDK

- Android: v10.8.0 + purchases-ui v10.8.0 (Gradle)
- iOS: v5.78.0 + RevenueCatUI v5.78.0 (xcframework)

App Stores

- Google Play
- Apple App Store

* **Android:** JNI calls a Java bridge class → RevenueCat SDK. Callbacks return via JNI native methods, marshalled onto the game thread.
* **iOS:** Obj-C++ calls the RevenueCat SDK directly. Callbacks dispatched to the game thread via `AsyncTask`.
* **Win64 editor:** All functions are stubbed. `ConfigureSDK` fires `OnConfigured` so initialization logic works. Other async operations won't fire callbacks.

---

## Requirements

| Requirement | Details |
| --- | --- |
| **Engine** | Unreal Engine 5.5+ |
| **Platforms** | Android, iOS (editor stubs for Win64) |
| **Android min SDK** | API 23 (Android 6.0)+, required by RevenueCat 10 / Google Play Billing 8 |
| **RevenueCat account** | Free tier at [revenuecat.com](https://www.revenuecat.com/) |
| **Store setup** | Google Play Console and/or App Store Connect with products configured |
| **RevenueCat dashboard** | Products linked, offerings created, entitlements configured |
| **Paywall (iOS)** | iOS 16.0+ required for native paywall UI |
| **Paywall (Android)** | Jetpack Compose support (included automatically via Gradle) |

---

## Support and Resources

- [![](https://rigbak.com/logos/Fab-Logo-White.svg) Get on Fab](https://www.fab.com/listings/2079b69b-fbe5-49ad-86e1-95454310d727)
- [💬 Discord Support](https://discord.com/invite/CbRcTsYQcz)

---

**RevenueCat Bridge** is built by **Hakan Erunsal**. Not affiliated with or endorsed by RevenueCat, Inc., Google LLC, or Apple Inc.
