Staaarter

Billing Next Payment Preview

A preview of a customer's next charge, led with the total amount and date, then broken down into a seat-count line, any number of tax lines, and an optional applied credit. Built for subscription billing portals where the charge is seat-based and where showing the total up front, before the itemization, matters more than a line-items-first layout.

By Staaarter Team
Billing
Updated June 1, 2026
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its card dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/billing-next-payment-preview.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing77.tsx instead.

Usage

The file also exports billing77Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Billing77, billing77Demo } from "@/components/blocks/billing/billing77";

export default function Page() {
  return <Billing77 {...billing77Demo} />;
}

Props

PropTypeDefaultDescription
titlestring"Next payment"Heading shown in the card header.
nextPaymentDatestringnoneDate the next charge occurs, shown in the header and referenced in the total's aria-label.
seatCountnumbernoneNumber of seats billed; pluralizes 'seat' automatically.
pricePerSeatstringnoneFormatted per-seat price shown next to the seat count.
seatSubtotalstringnoneFormatted subtotal for the seat line, seatCount times pricePerSeat, computed by the caller.
taxesNextPaymentTaxLine[][]Zero or more tax lines rendered in order below the seat line.
creditstringnoneOptional formatted credit amount, shown in an emerald 'Credit applied' row when set.
totalstringnoneFormatted total charge, shown as the large lead figure.
paymentMethodLabelstringnoneOptional payment method description shown in the footer, for example a card's brand and last four digits.
classNamestringnoneExtra classes for the outer card.

Types

interface NextPaymentTaxLine {
  label: string;
  amount: string;
}

Behavior notes

  • The total is a plain string you compute and pass in; the component doesn't sum seatSubtotal, tax lines, and credit itself, it only displays the number you give it.
  • taxes is rendered as an arbitrary-length list, so a customer with VAT plus a local digital-services tax shows two separate rows in the order given.
  • The credit row only appears when credit is a truthy string, and always renders in an emerald color to distinguish it from charges.
  • The footer note is omitted entirely when paymentMethodLabel isn't passed, rather than showing an empty footer.

Frequently asked questions