Charge Summary

Shows what will be charged today, when the first and renewal charges happen and what taxes apply, so checkout has no surprise charges.

StopsSurprise charge at checkout

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/charge-summary.json

The files land in your project. They're yours to edit.

Usage

charge-summary-usage.tsx
import { ChargeSummary } from "@/components/ui/charge-summary"

<ChargeSummary
  now="2026-10-13T10:00:00+05:30"
  timeZone="Asia/Kolkata"
  trialEndsAt={trial ? "2026-10-27T10:00:00+05:30" : undefined}
  lines={
    trial
      ? [{ label: "Pro plan, monthly", amount: 499 }]
      : [
          { label: "Pro plan, monthly", amount: 499 },
          { label: "Credit for unused Starter time", amount: -120, recurring: false },
          { label: "One-time setup fee", amount: 49, recurring: false },
        ]
  }
  taxes={[{ label: "GST", rate: 18, inclusive }]}
/>

What it catches

  • A trial that turns into a charge, with the exact date
  • One-time credits or discounts that won't repeat at renewal
  • Taxes added on top versus already included
  • The renewal amount and interval

Props

ChargeSummary props
PropTypeDefault
lines* (required)

Every line that makes up the charge, fees included, so nothing appears later.

ChargeLine[]—
taxes

Taxes as percentages of the subtotal, e.g. `{ label: "GST", rate: 18 }`, or `inclusive: true` when prices already include it.

ChargeTax[][]
currency

ISO 4217 code.

string"INR"
locale

Locale for amounts and dates.

string"en-IN"
interval

Billing period.

ChargeInterval"month"
intervalCount

How many periods each renewal covers, e.g. 3 for quarterly with `interval="month"`.

number1
trialEndsAt

When the free trial ends. Nothing is charged before then.

Date | string—
now

The checkout moment. Pass it for deterministic rendering; otherwise the current time is read after mount.

Date | string—
timeZone

Time zone used for every date shown.

string—
todayLabel

Heading above the big number.

string"You pay today"
messages

Reword or translate any sentence.

Partial<typeof CHARGE_SUMMARY_MESSAGES>—

* required. Also accepts the native props of <section> (className, aria-*, data-*…), passed through to it.

Accessibility

  • Wrapped in a region with an aria-label
  • Line items are a description list (<dl>)
  • Icons are aria-hidden; everything is stated in text

Only what the source does. Test with your own screen reader and content before shipping.

Limitations

This is a UX guard rail. Enforce on the server: Charge the amount your billing system computes, not the client's figures.

  • Displays the lines and tax rates you pass; it doesn't calculate tax rules
  • Dates use the time zone you pass, or the visitor's

What it stops

Surprise charge at checkout

Also known as

order summary · checkout · pricing · subscription · renewal · tax · gst · total

Dependencies

Pairs well with