Billing Service Status Integration
A billing trust block that shows the health of every service checkout depends on, Stripe, PayPal, your own webhook service, and tax calculation. When any service reports an outage, a destructive alert banner appears at the top; a partial degradation shows a milder warning instead. Built for checkout pages and billing dashboards where a silent failure looks like a broken app.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its alert dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/billing-service-status-integration.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing121.tsx instead.
Usage
The file also exports billing121Demo, 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 { Billing121, billing121Demo } from "@/components/blocks/billing/billing121"; export default function Page() { return <Billing121 {...billing121Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Payment system status" | Heading shown above the service list. |
| description | string | none | Optional one-line note under the heading. |
| services | ServiceStatusItem[] | none | Services rendered in the order given, each with its own status. |
| lastCheckedLabel | string | none | Optional timestamp text shown at the top right, for example "Checked 1 minute ago". |
| className | string | none | Extra classes for the outer container. |
Types
interface ServiceStatusItem { name: string; status: "operational" | "degraded" | "outage"; description?: string; }
Behavior notes
- The banner at the top is computed from the services array, not a separate prop: any outage shows a destructive alert, and if there's no outage but at least one degraded service, a milder default-variant alert shows instead.
- The operational status dot uses a CSS animate-ping ring behind a solid dot; degraded and outage dots are static so the eye is drawn to whichever service actually needs attention.
- Status is a fixed 3-value union (operational, degraded, outage). Add a new state by extending both the type and the STATUS_CONFIG map.
- This component only renders whatever status you pass in. Fetching live status from Stripe, AWS, or your own health-check endpoint and mapping it into the services array is left to the caller.
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.