Skip to main content

CrossmintEmbeddedCheckout

Props

EmbeddedCheckoutV3Appearance
string
"external"
"external": you mount CrossmintIdentityVerification from getIdentityVerificationCredentials(order), or the buyer cannot finish.
string
string
EmbeddedCheckoutV3Payment
required
EmbeddedCheckoutV3LineItem | EmbeddedCheckoutV3LineItem[]
Locale
JSONObject
EmbeddedCheckoutV3Recipient

Usage


CrossmintHostedCheckout

Props

CrossmintHostedCheckoutV3Appearance
EmbeddedCheckoutV3LineItem | EmbeddedCheckoutV3LineItem[]
Locale
JSONObject
HostedCheckoutV3Payment
required
EmbeddedCheckoutV3Recipient
string
string

Usage


CrossmintIdentityVerification

Props

EmbeddedCheckoutV3Appearance
IdentityVerificationCredentials
required
Locale
() => void
The user closed the flow: Done on a blocked screen, or closing document capture. Without it, Done does nothing.
(result: { status: "expired" | "unknown" | "failed" | "verified" | "pending-review" | "pending-manual-review" | "declined" }) => void
The flow ended with a result. Unmount here, not when the credentials go away: the order moves on first.
(error: object) => void
() => void

Usage

Note: Keep the component mounted until onComplete or onCancel: the order leaves requires-kyc, and the hook returns undefined, before the flow shows its result. Handle onCancel, or the Done button on blocked screens does nothing. Pass the appearance object you give embedded checkout, so both look the same.

CrossmintPaymentMethodManagement

Lets the user save a new card or bank account, or pick one of their saved payment methods. Rendered in a Crossmint-hosted iframe, so payment details never touch your app. Takes the user’s Crossmint jwt. onPaymentMethodSelected receives the chosen method; its paymentMethodId is what your backend uses to pay (for example to create order intents). To use your own button instead of the component’s, pass hideSubmitButton and a ref, and call ref.current.submit() from your button: it resolves with the selected or saved method, or with why the submit could not complete.

Props

"new" | "existing"[]
Which sections the management UI renders. ["new"] (default) shows only the “add new” section: no saved-methods fetch, no auto-open/auto-select of an existing method. Include "existing" to also show the saved-methods section.
PaymentMethodManagementAllowedType[]
Filter array of which method types the “add new” section offers (default ["card"]). LM0 renders the first supported entry; passing more than one type does not yet render a type picker.
PaymentMethodManagementAppearance
boolean
Render no Save/Continue button inside the component (default false). Pair it with a ref and call ref.current.submit() from your own button.
string
required
(paymentMethod: CrossmintPaymentMethod) => void | Promise<void>

Usage

Note: CrossmintPaymentMethodManagement renders an iframe-based UI for managing saved payment methods. Requires a valid JWT for authentication. The onPaymentMethodSelected callback receives a discriminated union — narrow on type before accessing variant-specific fields.

CrossmintProtectedInput

Collect a protected text or numeric field in a Crossmint-hosted iframe. Call ref.collect() from your submit action to receive a protected reference or a collection error. Your page renders the label, button, and error message; collection keeps the entered value out of application JavaScript.

Props

ProtectedInputAppearance
boolean
string
ISO 8601; server default is 24 hours, maximum is 7 days.
ProtectedInputField
required
boolean
Controls the visual invalid state; the developer renders the error message.
string
required
Buyer’s JWT from the application’s external auth integration.

Usage

Note: Pass the protected field descriptor from an Agent Checkout form as field, your browser client API key to CrossmintProvider, and the buyer JWT as jwt. The iframe renders only an input; your page owns the button and errors. ref.collect() returns collected, invalid, unavailable, or superseded. Submit result.input under the field key in response.answers alongside ordinary answers. Unchanged successful collections reuse the reference; edits invalidate that reuse. Use one ref per protected field. display: “masked” controls presentation independently of handling. Collection keeps plaintext out of application JavaScript; it does not mask merchant-page screenshots or recordings.

CrossmintAgentCardAuthorization

Lets a buyer authorize a bounded card spend for Agent Checkouts and hands back an orderIntentId. Composes card selection, order-intent registration, order-intent creation and rail verification; the rail is chosen by a fixed policy, never by the model or the buyer. The card number, CVC and vault token id never reach this component’s callbacks.

Props

"new" | "existing"[]
Sections of the payment-method UI to render. Defaults to ["existing", "new"].
{ currency: string; value: string }
required
value is a decimal string with up to 4 places, greater than 0; currency is a 3-letter code.
AgentCardAuthorizationAppearance
string
required
string
required
Shown to the buyer by the rail verification UI.
string
ISO 8601 datetime in the future. Defaults to 24 hours from mount.
string
required
The buyer’s Crossmint auth token, the same one CrossmintPaymentMethodManagement takes.
OrderIntentMerchant
required
(result: AgentCardAuthorizationResult) => void
required
(error: AgentCardAuthorizationError) => void
required

Usage

Note: CrossmintAgentCardAuthorization composes card selection, order-intent registration, order-intent creation and rail verification, and calls onAuthorized once with an orderIntentId. Submit that ID as response.orderIntentId in the Agent Checkout’s payment input response. The rail is chosen by the same policy the server applies (vic, then agentpay, then encrypted-card, preferring a rail that is already active); card numbers, CVCs and vault token ids never reach your JavaScript. Lifecycle: after onAuthorized the component renders nothing; after onError it returns to card selection so the buyer can try again; state lives for one mount, so a remount (a key or route change) creates a new order intent for the same spend and your app must store the orderIntentId from onAuthorized. Pass the buyer’s JWT as jwt, like CrossmintPaymentMethodManagement. appearance.paymentMethodManagement styles the card selection and the CVC recollection form, appearance.verification the card-network verification modal.