Skip to content

Settings

Settings payment methods

The Payment methods pane of space settings, showing saved cards with a default badge, a per-card action menu, and an add-card dialog.
Available
Ports as-is

Examples

Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.

Settings payment methods

Rendered live from Storybook

Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.

Props

The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.

PropTypeDefaultDescription
methodsSavedPaymentMethod[][]Saved cards to list. Defaults to an empty list.
onMakeDefault(id: string) => void—Fired by "Make default". The mutation belongs to the caller.
onRemove(id: string) => void—Fired when the remove confirmation is confirmed.
onAddMethod() => void—Fired by the add form's primary button. Carries no card data — see the note below.
isMobilebooleanfalseOverrides the mobile fork: below `md` the add form is a full-screen Dialog, at and above it an AlertDialog. Both trees stay renderable at any viewport.
defaultAddOpenbooleanfalseOpens the add-card form on mount.
initialRemoveTargetIdstring | nullnullOpens the remove confirmation on mount for the card with this id.
placeholdersPaymentFormPlaceholdersDEFAULT_PLACEHOLDERSPlaceholder copy for the add form.
classNamestring—Undocumented — add TSDoc to the prop in the library.

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/settings/SettingsPaymentMethods.tsx
Portability
Copies across unchanged — only the utils import path moves.
Notes
Use it to display and manage a wallet of saved cards, with make-default and remove actions handled through callbacks. The add-card form is a display-only mock: its fields are read-only with autocomplete disabled and there is no real card data captured or submitted, so it should not be wired to an actual payment processor as-is.