Skip to main content

Overview

The BillingOSClient class provides direct access to all BillingOS API methods. Use it when you need more control than hooks and components provide.
Most apps should use the hooks and components instead. The client is for advanced use cases like custom data fetching, server-side rendering, or non-React integrations.

Access the client

From within a BillingOSProvider:
Or create a standalone client:

Constructor options

Methods

Customers

Subscriptions

Entitlements and features

Usage tracking

Invoices

Payment methods

Checkout

Checkout modal (iframe)

Access via client.checkout.*:

Portal (iframe)

Access via client.portal.*:

Pricing

Upgrade nudge

Error classes

The client throws typed errors you can catch:

Imperative checkout API

Open checkout from anywhere in your app — even outside React components: