Staaarter

Billing Affiliate Commission Summary

A commission summary card for an affiliate or referral dashboard. It splits earnings into pending, approved, and lifetime totals, shows the next scheduled payout date and amount, and lists recent referrals with a status badge per row. Static by default so it can render directly from your affiliate tracking data.

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 badge, button dependencies and any missing npm packages, and installs them straight into your project.

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

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

Usage

The file also exports billing18Demo, 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 { Billing18, billing18Demo } from "@/components/blocks/billing/billing18";

export default function Page() {
  return <Billing18 {...billing18Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Affiliate earnings"Heading in the card header.
descriptionstringnoneOptional supporting sentence under the heading.
pendingAmountstringnoneFormatted commission still pending, e.g. "$186.00".
approvedAmountstringnoneFormatted commission approved and queued for payout.
lifetimeAmountstringnoneFormatted lifetime commission total.
conversionRatestringnoneOptional formatted referral-to-paid conversion rate. Omitted from the card when not passed.
nextPayoutDatestringnoneFormatted date of the next scheduled payout.
nextPayoutAmountstringnoneFormatted amount expected in the next payout.
referralsReferralRow[]noneRecent referral rows, rendered in the order given.
detailsLabelstring"View payout history"Label on the footer link.
detailsHrefstring"#"Destination for the footer link.
classNamestringnoneExtra classes for the outer card.

Types

interface ReferralRow {
  id: string;
  customer: string;
  date: string;
  amount: string;
  status: "pending" | "approved" | "paid";
}

Behavior notes

  • pendingAmount, approvedAmount, and lifetimeAmount are plain formatted strings, not numbers, so currency formatting is entirely up to the caller.
  • Referral status uses a fixed 3-value union (pending, approved, paid) mapped to badge colors in STATUS_STYLES.
  • conversionRate only renders when passed, so the block works without it for programs that don't track referral clicks.
  • The referrals list has no pagination or sorting built in; pass it already sorted and trimmed to whatever length fits your dashboard.
  • View payout history renders as a next/link via the Button component's render prop, pointing detailsHref at a dedicated payout history page.

Frequently asked questions