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.
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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Payout destination" | Heading above the form. |
| description | string | (see source) | Supporting text under the heading. |
| defaultMethod | "bank" | "paypal" | "bank" | Which payout method is selected on first render. |
| submitLabel | string | "Save payout details" | Label on the submit button in its idle state. |
| submittingLabel | string | "Saving" | Label on the submit button while the simulated save is in progress. |
| savedHeading | string | "Payout details saved" | Heading shown after a successful submit. |
| savedMessage | string | (see source) | Supporting text shown after a successful submit. |
| className | string | none | Extra 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
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.