Migrating from RevenueCat
Tenth covers the same ground as RevenueCat for Expo apps: store purchases, entitlements, offerings, a remote-configured paywall, webhooks and a server API. This page maps one onto the other.
Concepts
| RevenueCat | Tenth |
|---|---|
| Project, app | Workspace, app. Each app has a test and a live environment, with their own keys and data. |
| Public SDK key (one per platform) | One publishable key per app environment, for every platform (tenth_test_pk_...). |
| Secret API key | Secret key (tenth_test_sk_...), for your server only. |
| App user ID | app_user_id: the user ID claim of your sign-in token (sub by default). See Customer identity. |
Anonymous ID ($RCAnonymousID:...) | Anonymous ID ($tenth_anon_...), merged into the signed-in customer on the first call with a token. |
Purchases.logIn / logOut | No calls: pass getCustomerToken and userId to TenthProvider. The SDK follows sign-in, sign-out and account switches. |
| Entitlement | Entitlement, with the same idea: a key such as pro that products unlock. |
| Offering, package | Offering, product. An offering lists catalog products directly; there's no separate package layer. |
| Current offering | The current offering: the highest-priority offering whose targeting matches, else the default. useOffering() with no key. |
CustomerInfo | CustomerState (entitlements, credits, subscriptions). Tenth's own CustomerInfo type is what useCustomer() returns. |
addCustomerInfoUpdateListener | Hooks re-render on changes. Outside React, useTenth().subscribe(listener). See Listening for changes. |
purchasePackage, purchaseStoreProduct | useTenth().purchase(productKey), or usePaywall().purchase(). |
purchaseSubscriptionOption (Play offers) | purchase(productKey, { googleOfferId }), or name the offer on the catalog product. See Google Play offers. |
| Promotional offers | purchase(productKey, { appleOfferId }); Tenth signs the offer. |
restorePurchases | restore(). |
showManageSubscriptions | manageSubscription(). |
RevenueCat Paywalls, presentPaywallIfNeeded | <Paywall />, presentPaywall() and presentPaywallIfNeeded(), configured in the dashboard. |
Subscriber attributes, setEmail | Set from your server with customers.update. There's no app-side setter. To bill a team, make the workspace the customer (Billing a team or workspace). |
| Webhooks | Webhooks, signed, with the customer's full state in every event, plus an event feed you can read from any point. |
| REST API v1/v2 | The REST API and @tenthbilling/node. |
| Virtual currencies | Credits, with balances, holds and spending from your server or the app. |
In the app
- Remove
react-native-purchases(andreact-native-purchases-ui), and install@tenthbilling/expoas the quickstart shows. Check the supported versions first. - Replace
Purchases.configurewithTenthProvidernear the root, with your publishable key,getCustomerTokenanduserId. - Replace entitlement checks with
useEntitlement('pro')or<Gate>, and the paywall with<Paywall />orpresentPaywallIfNeeded(). - Make a development build. The SDK includes its own StoreKit 2 and Play Billing module.
On your server
- Replace RevenueCat API calls with
@tenthbilling/node:tenth.hasEntitlement(appUserId, 'pro')for access checks. - Replace the RevenueCat webhook handler with one for Tenth's webhooks. Event names and payloads differ: every Tenth event carries the customer's full state, so most handlers only read
customer.entitlements. - If you stored subscriber attributes, move them to your own records or to
customers.update, which keeps them on the customer for your reference.
Store notifications
Point the App Store's and Google Play's server notifications at Tenth, or run both side by side by forwarding them from RevenueCat. See Store notifications.
Existing customers
Tenth doesn't know about purchases made before the switch until they're sent to it. RevenueCat's SDK already finished those store transactions, so the Tenth SDK doesn't resend them on launch. A customer's existing purchases reach Tenth when they use Restore purchases in the new app version (or your app calls restore()), which sends the store's current purchases to Tenth. Until then, they show as having no entitlement in Tenth. Stripe customers can't be restored this way.
Coming in a later release:
- RevenueCat import: bring over customers, aliases and purchase history before the switch.
- Dry-run report: compare every customer's entitlements in RevenueCat and in Tenth, and list mismatches, before you rely on Tenth.
- Dual-run mode: keep RevenueCat primary while Tenth receives the same notifications, without counting that revenue toward Tenth's billing.
Until the importer ships, plan the switch carefully: keep RevenueCat running for customers on older builds, check access on your server against both services during the switch, or give existing subscribers a grant from your server until they've restored.