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


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).

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
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

Collects the password of the buyer’s account on a merchant site inside a Crossmint-hosted iframe and returns an opaque protectedInputId to hand to Universal Checkout. The password never reaches this component, the developer’s JavaScript, or the agent. Takes the buyer’s JWT as a prop, like CrossmintPaymentMethodManagement.

Props

ProtectedInputAppearance
string
ISO 8601 datetime. Server default is 24 hours from creation; the maximum is 7 days.
string
required
The buyer’s Crossmint auth token, the same one CrossmintPaymentMethodManagement takes.
string
Text shown above the field, for example the merchant name. At most 120 characters.
string
required
The merchant sign-in page the password is for. Its host becomes the input’s merchant domain; Universal Checkout may only use the input on that host or a subdomain of it.
(created: { expiresAt: string; merchant: object; protectedInputId: string; purpose: "password" }) => void
Called once with the opaque protectedInputId to hand to Universal Checkout.
(error: { code: string; message: string }) => void

Usage

Note: CrossmintProtectedInput collects the password of the buyer’s account on a merchant site inside a Crossmint-hosted iframe and returns only an opaque protectedInputId. Pass that id to Universal Checkout as the protected input response; the password never reaches your JavaScript. Pass the buyer’s JWT as jwt, like CrossmintPaymentMethodManagement. Lifecycle: the hosted page posts exactly one terminal event per mount, so after onCreated or onError remount the component (change its key) to collect again; the page posts invalid_params when it rejects the props.

CrossmintAgentCardAuthorization

Lets a buyer authorize a bounded card spend for Universal Checkout 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. Pass that id to Universal Checkout as the run’s payment: { orderIntentId } or as the 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.