OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
BillingOS mobile compatibility
Build BillingOS once, then project it into web and mobile
BillingOS should not be a desktop-only billing console. The contract layer must describe plans, entitlements, invoices, payment state, and provider evidence so mobile apps can render safe, resumable billing flows with native affordances.
Web
Use browser checkout, account settings, invoices, and admin billing dashboards from the same plan and entitlement contracts.
Mobile
Use compact plan cards, native deep-link return handling, offline-safe invoice previews, and explicit restore/resume actions.
Shared runtime
Resolve tenant, account, entitlement, billing period, and provider evidence before either shell renders actions.
Mobile implementation checklist
- Use BillingOS contracts for plans, subscriptions, invoices, entitlements, and payment evidence before choosing web or native presentation.
- Expose a compact subscription summary for mobile home, settings, and paywall surfaces.
- Make checkout and plan-change handoffs resumable after app backgrounding, deep links, provider redirects, or native purchase callbacks.
- Cache read-only invoice and entitlement evidence safely; never cache secrets, payment credentials, or mutable provider state as source of truth.
- Keep provider-specific flows in integrations such as Stripe, StoreKit, Google Play Billing, or crypto payment adapters.
- Log billing state transitions as auditable events that both web and mobile can display consistently.
Recommended shared snapshot
Mobile screens should receive a small resolved snapshot instead of duplicating provider APIs. Keep BillingMobileSnapshot derived from canonical BillingOS contracts and server-side provider evidence.
type BillingMobileSnapshot = {
accountId: string;
planKey: string;
entitlementKeys: string[];
billingStatus: "active" | "trialing" | "past_due" | "canceled";
nextInvoiceAt?: string;
resumablePaymentIntentId?: string;
};
// Web and mobile consume the same resolved snapshot.
// Native shells decide how to render tabs, sheets, gestures, and deep-link return UI.Compatibility boundary
BillingOS owns billing truth and platform-neutral actions. Next.js, Expo Router, StoreKit, Google Play Billing, Stripe Checkout, and wallet adapters own platform mechanics. Do not hide those mechanics; bind them through explicit integration contracts and record the evidence returned by each provider.
BillingOS
Implement plans, subscriptions, invoices, payments, entitlements, and billing evidence across web and mobile.
CompanyOS
Implement company workspace, operating graph, teams, objectives, and decision records as a reusable domain.
Why ContractSpec
Keep educational and comparison content reachable without letting it define the primary OSS learning path.