Staaarter

Billing Payout Destination Form

A structured form for collecting where a partner or seller should be paid, either a bank account or PayPal, plus a masked tax ID field. Switching the payout method swaps the required fields, the tax ID can be shown or hidden, and submitting with missing fields shows an inline validation message instead of failing silently. Built for partner and affiliate onboarding flows.

By Staaarter Team
Billing
Updated May 18, 2026
Docs
Live preview

Docs

Installation

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

npx shadcn add https://staaarter.com/r/billing-payout-destination-form.json

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

Usage

The file also exports billing89Demo, 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 { Billing89, billing89Demo } from "@/components/blocks/billing/billing89";

export default function Page() {
  return <Billing89 {...billing89Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Payout destination"Heading above the form.
descriptionstring(see source)Supporting text under the heading.
defaultMethod"bank" | "paypal""bank"Which payout method is selected on first render.
submitLabelstring"Save payout details"Label on the submit button in its idle state.
submittingLabelstring"Saving"Label on the submit button while the simulated save is in progress.
savedHeadingstring"Payout details saved"Heading shown after a successful submit.
savedMessagestring(see source)Supporting text shown after a successful submit.
classNamestringnoneExtra classes for the outer form container.

Behavior notes

  • Switching between Bank account and PayPal swaps the visible fields entirely; bank details and the PayPal email are never both shown or required at once.
  • Submitting with any required field empty sets a local "attempted" flag that marks the missing inputs aria-invalid and shows a single inline error message, without calling any submit logic.
  • A successful submit is simulated with a setTimeout: the button shows a spinner and "Saving" for about 900ms, then the whole form is replaced by a saved confirmation state. There's no network call.
  • The tax ID field renders as a password input by default; a toggle button switches it to plain text and back, with the icon and aria-label reflecting the current state.
  • There's no prop or callback to report the submitted values to a parent component; wire your own onSubmit handling by replacing the component's internal handleSubmit with a real API call.

Frequently asked questions