# Billing Page (Pro)

> A SaaS billing page in two surfaces: the current plan with what it includes and the days to renewal, the next invoice line by line with the card it's charged to, usage against limits with overage costs, and a billing history with pay, retry and download.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Blocks › App Screens |
| Live preview | https://uibrik.com/components/billing-page |
| Writes | 1 files into `components/uibrik/billing-page/`, plus `components/uibrik/_app/app-kit.tsx` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 22, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/billing-page
```

No license yet? Tell the user Billing Page is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=billing-page#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { BillingPage } from "@/components/uibrik/billing-page/billing-page";

const plans = [
  {
    id: "hobby",
    name: "Hobby",
    monthly: 0,
    yearly: 0,
    detail: "1 seat, 100k events, 7-day history",
    features: ["100k events a month", "7-day history", "Community support"],
  },
  {
    id: "pro",
    name: "Pro",
    monthly: 20,
    yearly: 200,
    detail: "Up to 10 seats, 2M events, 1-year history",
    features: ["2M events a month", "1-year history", "50 GB storage", "Email support"],
    perSeat: true,
  },
  // …1 more
];

const usage = [
  {
    id: "events",
    label: "Events",
    used: 1_240_000,
    limit: 2_000_000,
    overage: { unit: 100_000, price: 0.5 },
  },
  { id: "seats", label: "Seats", used: 6, limit: 10 },
  // …2 more
];

const invoices = [
  {
    id: "in_2041",
    number: "INV-2041",
    date: "2026-11-01",
    amount: 120,
    status: "due",
  },
  {
    id: "in_1987",
    number: "INV-1987",
    date: "2026-10-01",
    amount: 120,
    status: "paid",
  },
  // …6 more
];

<BillingPage
  defaultPlan="pro"
  defaultInterval="month"
  seats={6}
  currency="USD"
  plans={plans}
  renewsOn="2026-12-01"
  today="2026-11-20"
  workspace="Acme"
  usage={usage}
  invoices={invoices}
  card={{ brand: "visa", last4: "4242", exp: "08/28" }}
  address="100 Market St, San Francisco, CA 94105"
  billingEmail="billing@acme.com"
  onPlanChange={(plan, interval) => {}}
  onUpdateCard={(card) => {}}
  onCancel={() => {}}
  onRetryInvoice={(id) => {}}
  onDownloadInvoice={(id) => {}}
  // plan="…"
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/billing-page.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `defaultPlan` | `"hobby" \| "pro" \| "team"` | `"pro"` | Plan id shown first when uncontrolled. |
| `defaultInterval` | `"month" \| "year"` | `"month"` | Billing interval shown first. |
| `seats` | `number` | `6` | Seats billed on per-seat plans. |
| `currency` | `"USD" \| "EUR" \| "GBP"` | `"USD"` | ISO 4217 currency code for every price. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `plans` | `{ id: string; name: string; monthly: number; yearly: number; detail: string; features?: string[]; perSeat?: boolean }[]` |  | Plans offered in the change-plan dialog. |
| `plan` | `string` |  | Controlled plan id. Pair with onPlanChange. |
| `onPlanChange` | `(plan: string, interval: "month" \| "year") => void \| Promise<void>` |  | Called once a switch is confirmed. The dialog stays busy until the promise settles. |
| `renewsOn` | `string` | `"2026-12-01"` | ISO date the plan renews. |
| `today` | `string` | `"2026-11-20"` | ISO date for today, to place it in the billing period. Pass it from the server so renders agree. |
| `workspace` | `string` | `"Acme"` | Named under the page title. |
| `usage` | `{ id: string; label: string; used: number; limit: number; format?: "number" \| "bytes"; overage?: { unit: number; price: number }; note?: string }[]` |  | Meters for this period. Amber from 85%, red over the limit; overage adds to the next invoice. |
| `invoices` | `{ id: string; number: string; date: string; amount: number; status: "paid" \| "due" \| "failed" \| "refunded" }[]` |  | Newest first. The first five show; the rest open on demand. |
| `card` | `{ brand: "visa" \| "mastercard" \| "amex" \| "card"; last4: string; exp: string }` |  | The card on file. |
| `address` | `string` |  | Billing address, one line. |
| `billingEmail` | `string` |  | Where receipts go. |
| `onUpdateCard` | `(card: PaymentCard) => void \| Promise<void>` |  | Called with a valid new card. Send the raw number to your payment provider, not here. |
| `onCancel` | `() => void \| Promise<void>` |  | Called once cancelling is confirmed. |
| `onRetryInvoice` | `(id: string) => void \| Promise<void>` |  | Pays a failed or due invoice. Resolve to mark it paid. |
| `onDownloadInvoice` | `(id: string) => void` |  | Called from an invoice's download button. |
| `className` | `string` |  | Classes for the root. |

## Where it fits

- **SaaS billing settings**: Plan, card, usage and invoices sit on one screen, so customers find what they pay and why without hunting through tabs. Pairs with [Settings Page](https://uibrik.com/components/settings-page.md) (Pro).
- **Usage-based pricing**: Meters turn amber near a limit and red over it, with the overage price under each, so surprise bills come with warning. Pairs with [Usage Pricing](https://uibrik.com/components/usage-pricing.md) (Pro) and [Pricing Calculator](https://uibrik.com/components/pricing-calculator.md) (Pro).
- **Failed payment recovery**: A failed or due invoice gets a Pay button in its row, so customers fix a declined card where they notice it. Pairs with [Card Input](https://uibrik.com/components/card-input.md) (Pro).

## Same shelf: App Screens

- [Email Composer](https://uibrik.com/components/email-composer.md): An email composer with recipient chips and suggestions, contact cards on hover, drag-and-drop attachments with upload progress, and a send button that schedules.
- [Org Chart](https://uibrik.com/components/org-chart.md): A pan-and-zoom org chart whose teams grow out of and fold back into their manager, with search that flies to a person, a minimap and profile cards.
- [Calendar Zoom](https://uibrik.com/components/calendar-zoom.md) (Pro): A calendar that zooms from month to week to day with every event morphing between views, and events that drag and resize on a snapping time grid. The hours stretch to fill the height.
- [Cart Flight](https://uibrik.com/components/cart-flight.md) (Pro): A product grid where added items fly on a curve into the cart, the cart grows into a drawer, and removed items fly back to their card.
- [Checkout Flow](https://uibrik.com/components/checkout-flow.md) (Pro): Bag, details and receipt on one card, with editable addresses, saved cards, promo codes and a free-delivery meter; and a pay button that closes into a spinner and confirms with a check.
- [Daily Rings](https://uibrik.com/components/daily-rings.md) (Pro): A goal tracker of concentric rings: open one and it grows to the centre with quick logging, a week of bars and a streak; add, edit and delete goals in place.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/billing-page/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
