Skip to content
GitHub (opens in a new tab)

BillingSchedule

A customer's billing schedule in a kit Card: every charge, the next one, or the failed one.

stableOrganismcontracts/billingschedule.json

Preview

BillingSchedule

One customer's billing schedule in a kit Card: the full table, the next charge only, or the open failed payment.

Master

The full schedule, ready. Variants shows each view with its own empty, loading and error.

Billing schedule

Pro plan

DateDescriptionStatusAmount
01 Dec 2026Pro plan · monthly Next chargeUpcoming$480.00
01 Nov 2026Pro plan · monthlyPaid$480.00
18 Oct 2026Seat addedProrated for 14 daysInvoiced$22.40
01 Oct 2026Pro plan · monthlyCard declinedFailed$480.00
01 Sep 2026Pro plan · monthlyCredit appliedWaived$0.00

Usage

view is closed: full for billing settings, nextOnly for a dashboard card, failed for an account page that flags a failed payment. Status is a word in a Badge, money arrives pre-formatted and every date reads 01 Dec 2026. Update card in the failure Alert is the one solid primary.

Do's

  • a dashboard card with the next charge — view="nextOnly"
  • an account page that flags a failed payment — view="failed"
  • billing settings with the full charge table — view="full"

Don'ts

  • one invoice or credit note as a document — InvoiceDocument
  • choosing or changing a plan — PricingPlans
  • a generic list of rows with no billing meaning — Table
<BillingSchedule view="full" charges={charges} description="Pro plan" onDownloadAll={downloadAll} onUpdateCard={updateCard} />

A customer's billing schedule in a kit Card, one closed view: full (all charges in one Table), nextOnly (the next charge and its card) or failed (the open failed payment). Each view has its own empty, loading and error.

When to use

  • a dashboard card with the next charge — view="nextOnly"
  • an account page that flags a failed payment — view="failed"
  • billing settings with the full charge table — view="full"

When not to use

  • one invoice or credit note as a document — InvoiceDocument
  • choosing or changing a plan — PricingPlans
  • a generic list of rows with no billing meaning — Table

What an agent reads

import { BillingSchedule } from "agentic-ds-kit";
must
  • The Card is an article named by its Billing schedule heading
  • Status is a word in a kit Badge (Upcoming, Retrying, Invoiced, Paid, Failed, Waived), never colour alone
  • The next charge says Next charge in words after its description
  • Row actions are icon Buttons named with the charge and date, or the invoice
  • The nextOnly panel is a section named Next charge
  • aria-busy on the Card while loading; Skeletons announce Loading once
  • A load error and an open failed payment are kit Alerts (danger) with the amount and date in the failure title
defaults
  • view full
stops if
  • Do not rebuild a local billing schedule, charges table or next-charge card; use this component
  • Do not split upcoming and billed charges into two tables
  • Do not add a second solid primary; Update card in the failure Alert is the one
  • Do not reach into Card, Table, Badge or Alert markup to restyle them
  • Do not format money in the component; pass amounts pre-formatted

From contracts/billingschedule.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
viewfull | nextOnly | failedNofullClosed. full: every charge, upcoming first (oldest first) then billed (newest first). nextOnly: the next-charge panel. failed: the open failed charge first, then invoiced or retrying charges.
chargesarrayNo—{ id, date (YYYY-MM-DD), label, amount (pre-formatted), value?, status, invoice?, note?, splitLabel? }[]. status: scheduled, retrying, invoiced, paid, failed or waived. full and failed read it.
nextobjectNo—{ date, amount, paysWith }, all pre-formatted. nextOnly reads it; without it nextOnly shows its empty state.
descriptionstringNo—The Card description beside the title, such as the plan name.
failureDetailstringNo—The failure Alert's body: what was declined, when the retry runs and what to do before then.
emptyDescriptionstringNo—The empty state's one line. Defaults per view.
loadingbooleanNo—full and failed: the Table loading state (header plus Skeleton rows). nextOnly: the panel with Skeleton lines.
errorstringNo—What failed to load. A danger Alert titled for the view.
onRetryfunctionNo—Retry (outline, RotateCcw) in the error Alert.
onAskfunctionNo—Ask (outline, MessageCircle) in the Card header.
onDownloadAllfunctionNo—full only: Download all (ghost) in the Card header, hidden while the failure Alert shows.
onEditChargefunctionNo—(charge) => void. full only: an edit pencil on scheduled rows, named "Edit <label>, <date>". Open your own edit form.
onDownloadInvoicefunctionNo—(charge) => void. A Download icon on billed rows, named by the invoice.
onChangeCardfunctionNo—nextOnly: Change card (outline) at the end of the panel.
onUpdateCardfunctionNo—full and failed: Update card in the failure Alert, the one solid primary.
  • Component
    →

    InvoiceDocument

    A document view for an invoice or a credit note, not a PDF engine: header with status and actions, bill-to and dates, line items, totals and one line about payment.

  • Component
    →

    PricingPlans

    An in-product plan comparison for upgrades, not a marketing page: a Monthly / Yearly switch, one card per plan with price, features and one CTA.

  • Component
    →

    Table

    Simple semantic table for invoices, lists, and text rows, with optional sort, row menu, sticky header, loading, empty and error states, row dividers on or off, and one optional highlighted row.

  • Component
    →

    Card

    Framed tile with optional header, body, and footer actions.