Installation
Setup
Before using any SDK components, initialize it once with your API key (and optional base URL).Works with React, Next.js, and other frameworks using React 18+.
Core Widget: CustomerPortal
Displays a customizable customer dashboard with plans, subscriptions, billing, credits, and more.
Section Configuration
ThesectionsConfig prop controls what appears in the portal.
| Property | Type | Description |
|---|---|---|
key | SectionKey | Unique key of the section (see list below) |
hidden | boolean | Hide this section when true |
component | React.ComponentType | Replace the default section with your own component |
props | Record<string, unknown> | Extra props passed to the custom or default section |
Built-in Section Keys
| Key | Description |
|---|---|
upcomingInvoice | Displays next invoice details |
subscription | Active subscription overview |
walletBalance | Shows user wallet balance |
entitlementUsage | Displays resource usage |
paymentOverview | Payment summary and methods |
billingHistory | List of past transactions |
plan | Current plan details |
Styling
Import the SDK’s global styles into your app entry (e.g.,src/index.tsx or _app.tsx):
Upcoming Widgets
While theCustomerPortal is available today, we are also building additional widgets tailored to billing sections, feature flags, and usage dashboards. They’ll drop progressively, so keep an eye on the changelog for the latest releases and timelines.
See
SDKs/changelog for the latest version notes and widget rollouts.
