Updated
Billing Page
ProCustomize
Pro
Monthly
Seats6
USD
Installation
ProBilling Page is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/billing-page
Loading your installation…
Usage
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="…"/>Where to use Billing Page
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
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 and Pricing Calculator
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
Props
BillingPage- defaultPlan
- Type "hobby" | "pro" | "team"
- "pro"
- Plan id shown first when uncontrolled.
- defaultInterval
- Type "month" | "year"
- "month"
- Billing interval shown first.
- seats
- Type number
- 6
- Seats billed on per-seat plans.
- currency
- Type "USD" | "EUR" | "GBP"
- "USD"
- ISO 4217 currency code for every price.
- plans
- Type { id: string; name: string; monthly: number; yearly: number; detail: string; features?: string[]; perSeat?: boolean }[]
- –
- Plans offered in the change-plan dialog.
- plan
- Type string
- –
- Controlled plan id. Pair with onPlanChange.
- onPlanChange
- Type (plan: string, interval: "month" | "year") => void | Promise<void>
- –
- Called once a switch is confirmed. The dialog stays busy until the promise settles.
- renewsOn
- Type string
- "2026-12-01"
- ISO date the plan renews.
- today
- Type string
- "2026-11-20"
- ISO date for today, to place it in the billing period. Pass it from the server so renders agree.
- workspace
- Type string
- "Acme"
- Named under the page title.
- usage
- Type { 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
- Type { 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
- Type { brand: "visa" | "mastercard" | "amex" | "card"; last4: string; exp: string }
- –
- The card on file.
- address
- Type string
- –
- Billing address, one line.
- billingEmail
- Type string
- –
- Where receipts go.
- onUpdateCard
- Type (card: PaymentCard) => void | Promise<void>
- –
- Called with a valid new card. Send the raw number to your payment provider, not here.
- onCancel
- Type () => void | Promise<void>
- –
- Called once cancelling is confirmed.
- onRetryInvoice
- Type (id: string) => void | Promise<void>
- –
- Pays a failed or due invoice. Resolve to mark it paid.
- onDownloadInvoice
- Type (id: string) => void
- –
- Called from an invoice's download button.
- className
- Type string
- –
- Classes for the root.