Staaarter

Billing Checkout Summary

A final-review panel for checkout flows, listing each line item, subtotal, tax, and total, with a collapsible promo code field and a primary purchase button. Applying a code shows a short loading spinner before marking it applied, and completing the purchase does the same before swapping the button for a confirmation message. Built for SaaS checkout sidebars and subscription upgrade flows.

By Staaarter Team
Billing
Updated April 22, 2026
Docs
Live preview

Docs

Installation

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

npx shadcn add https://staaarter.com/r/billing-checkout-summary.json

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

Usage

The file also exports billing33Demo, 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 { Billing33, billing33Demo } from "@/components/blocks/billing/billing33";

export default function Page() {
  return <Billing33 {...billing33Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Order summary"Heading at the top of the panel.
itemsSummaryLineItem[]noneItemized rows listed above the subtotal.
subtotalstringnonePreformatted subtotal amount.
taxstringnonePreformatted tax amount; the tax row is omitted if not passed.
totalstringnonePreformatted total amount shown in the final row.
couponPromptLabelstring"Have a promo code?"Label for the link that expands the promo code field.
couponPlaceholderstring"Enter code"Placeholder text for the promo code input.
applyLabelstring"Apply"Label for the apply-code button.
purchaseLabelstring"Complete purchase"Label for the purchase button in its idle state.
purchasingLabelstring"Processing"Label shown on the purchase button while it's in its loading state.
purchasedHeadingstring"Purchase complete"Heading shown in the confirmation panel after purchase.
purchasedMessagestringnoneSupporting text under the purchase confirmation heading.
classNamestringnoneExtra classes for the outer container.

Types

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

Behavior notes

  • The promo code field is collapsed behind a "Have a promo code?" toggle; clicking it swaps the toggle for an input and an Apply button.
  • Applying a code sets a 600ms loading state on the Apply button, then shows the code as applied with a tag icon; there's no real validation against a coupon list, it always applies whatever was typed.
  • Once a code is applied, the toggle and input are hidden entirely rather than staying visible in a disabled state.
  • Clicking Complete purchase sets a 900ms loading state on the button (spinner plus disabled), then replaces the button with a confirmation panel; there's no way to undo a completed purchase from within the component.
  • Subtotal, tax, and total are all plain strings, so the component performs no arithmetic and applying a promo code doesn't change the displayed total.
  • The promo code toggle and purchase button are both hidden once the purchase is marked complete.

Frequently asked questions