Billing Order Confirmation
A confirmation screen for the end of a checkout flow, with a status icon, order ID, date, payment method, an optional line-item breakdown, and a total, followed by a download-receipt link and a primary button back to the dashboard. Supports a pending state for payment methods like ACH that don't settle immediately. Built as the calm, reassuring last step after a SaaS purchase.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/billing-order-confirmation.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing81.tsx instead.
Usage
The file also exports billing81Demo, 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 { Billing81, billing81Demo } from "@/components/blocks/billing/billing81"; export default function Page() { return <Billing81 {...billing81Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| status | "confirmed" | "pending" | "confirmed" | Switches the icon, icon color, and default heading between a settled and a still-processing order. |
| heading | string | none | Overrides the status's default heading ("Order confirmed" or "Order received"). |
| message | string | none | Optional supporting line under the heading. |
| orderId | string | none | Order identifier shown in the summary panel. |
| orderDate | string | none | Formatted date shown in the summary panel. |
| paymentMethodLabel | string | none | Masked payment method text, e.g. "Visa ending in 4242". |
| total | string | none | Formatted total shown at the bottom of the summary panel. |
| lineItems | OrderLineItem[] | none | Optional list of charge/discount/tax rows shown above the total. |
| receiptHref | string | none | When set, shows a "Download receipt" button; omitted entirely otherwise. |
| dashboardHref | string | none | Destination for the primary "Go to dashboard" button. |
| className | string | none | Extra classes for the outer container. |
Types
interface OrderLineItem { label: string; amount: string; }
Behavior notes
- status is the only thing that switches the icon, its color, and the default heading text (via an internal lookup keyed by "confirmed" or "pending"), so callers never pass an icon directly.
- lineItems is optional; when omitted the summary panel just shows the order ID, date, payment method, and total with no itemized breakdown.
- Both action buttons render as next/link elements through the Button component's render prop, so receiptHref and dashboardHref must be real routes rather than onClick handlers.
- The receipt button only appears when receiptHref is passed, letting you drop it entirely for flows that email the receipt instead of linking to one.
- There's no client-side state or animation; the component renders once from its props and stays static.
Frequently asked questions
More Billing Blocks
View all →Billing Invoice List
Invoice history table with status badges, formatted amounts, and a per-row download link, built with shadcn/ui and Tailwind CSS.
Billing Failed Payment Alert
High-contrast failed-payment alert with a message, a retry button, and an optional update-payment-method button, built with shadcn/ui and Tailwind CSS.
Billing Credit Balance
Compact credit balance card with a large total, an optional purchased-versus-promotional breakdown, a low-balance notice, and a top-up button.
Billing Payment Methods
A saved payment method list for React and Next.js with brand icons, a default badge, near-expiry warnings, and remove/set-default actions per row.
Billing Add Card
A card entry form for React and Next.js with auto-formatted fields, internal brand detection, and per-field validation feedback built with shadcn/ui and Tailwind CSS.
Billing Coupon Code
An inline promo code input for React and Next.js with a simulated loading state, an applied summary showing the discount amount, and an invalid-code message.