Tenth developer docs
Tenth handles subscriptions, one-time purchases and credits across the App Store, Google Play and Stripe. You set up your products in the dashboard, and two SDKs do the rest: one in your app, one on your server.
Which package to use
| Where it runs | Package | What it does |
|---|---|---|
| Your Expo app (iOS, Android, web) | @tenthbilling/expo | Shows the paywall, buys through StoreKit 2, Play Billing or Stripe, and tells your UI what the customer can access. |
| Your server (Node 24+, Deno 2) | @tenthbilling/node | Checks access, spends credits, gives grants, manages Stripe subscriptions, reads the event feed, verifies webhooks and mints customer tokens. |
Both packages are MIT licensed. From any other language, use the REST API.
Publishable and secret keys
Every app has two kinds of API key per environment. Test keys contain test, live keys contain live. One publishable key serves every platform of the app (iOS, Android and web).
| Key | Looks like | Where it goes |
|---|---|---|
| Publishable | tenth_test_pk_..., tenth_live_pk_... | In your app, with @tenthbilling/expo. |
| Secret | tenth_test_sk_..., tenth_live_sk_... | On your server only, with @tenthbilling/node. |
The rule is simple: secret keys never ship in an app. Anyone can unpack an app and read the keys inside it, and a secret key can act for every customer of its app. So each SDK refuses the other kind of key:
@tenthbilling/expothrowsInvalidKeyErrorif you pass it a secret key. If that happens, rotate the secret key in the dashboard.@tenthbilling/nodethrowsTenthErrorwith codepublishable_key_not_allowedif you pass it a publishable key.
A publishable key can only act for the customer the app is signed in as (or the device's anonymous customer). It can't read or change anyone else.
Check access on your server too
What the app knows about access is fine for showing and hiding UI. The device caches it, and a modified device can change what it stores. Anything that must not be bypassed, like generating content or spending credits, should be checked on your server with @tenthbilling/node.
Pages
- Quickstart: add paid features to an Expo app.
- Expo SDK: the full reference for
@tenthbilling/expo. - Node SDK: the full reference for
@tenthbilling/node. - REST API: authentication, idempotency, pagination, rate limits, versioning and the OpenAPI reference.
- Customer identity: Clerk, OIDC and server-minted tokens, anonymous customers, and billing a team or workspace.
- Store notifications: App Store and Google Play notification setup, and running next to RevenueCat.
- Migrating from RevenueCat: how RevenueCat's concepts map to Tenth.
- Accounting exports: the five self-checking CSV exports.
- Webhooks: event types, payloads and how to verify deliveries.
- Errors: every API error code, what causes it and what to do.
- Changelog: what changed in each release.