Staaarter

Billing Audit Logs

An audit log scoped to financial and plan changes, for a compliance or admin screen where billing history needs to stay separate from general account activity. Each entry shows the action, who or what performed it with a distinct icon for a person versus an automated system, the IP address when available, a timestamp, and a success or failed status badge. A CSV export link sits in the footer.

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

Docs

Installation

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

npx shadcn add https://staaarter.com/r/billing-audit-logs.json

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

Usage

The file also exports billing22Demo, 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 { Billing22, billing22Demo } from "@/components/blocks/billing/billing22";

export default function Page() {
  return <Billing22 {...billing22Demo} />;
}

Props

PropTypeDefaultDescription
titlestring"Billing audit log"Header text.
descriptionstringnoneOptional line under the header.
entriesBillingAuditLogEntry[]noneLog rows, rendered in the order given, newest first is the caller's responsibility.
exportLabelstring"Export CSV"Label on the export button.
exportHrefstringnoneLink target for the export action. The footer is omitted entirely if not set.
classNamestringnoneExtra classes for the outer container.

Types

interface BillingAuditLogEntry {
  id: string;
  action: string;
  actorName: string;
  actorType: "user" | "system";
  ip?: string;
  timestamp: string;
  status: "success" | "failed";
}

Behavior notes

  • Entries render in the order passed in, with no built-in sort, so hand them in newest-first if that's the order you want on screen.
  • actorType picks the row icon from an internal lookup, a person icon for 'user' and a bot icon for 'system', there's no icon prop to pass in directly.
  • The IP address is optional per entry and, when present, is shown inline next to the actor name and timestamp separated by middle dots.
  • The export footer, including the button, only renders when exportHref is provided.
  • There's no built-in pagination or filtering. Long lists just keep growing vertically, so page or filter the entries array yourself before passing it in.

Frequently asked questions