Skip to main content

Documentation Index

Fetch the complete documentation index at: https://primer.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

This reference documents all components, events, and configuration options in the Primer Checkout Web SDK.

Component hierarchy


Core components

ComponentDescription
<primer-checkout>Root component. Initializes the SDK, provides checkout context, and wraps all other components. This is the entry point.
<primer-main>Optional state manager that handles checkout states (loading, success, error) and provides layout slots.

Payment method components

ComponentDescription
<primer-payment-method>Renders a specific payment method (card, PayPal, Apple Pay, etc.) based on the type attribute.
<primer-payment-method-container>Container for filtering and organizing multiple payment methods using include and exclude attributes.
<primer-vault-manager>Displays and manages saved (vaulted) payment methods for returning customers.
<primer-show-other-payments>Toggle button to show/hide additional payment methods.

Card form components

ComponentDescription
<primer-card-form>Container that provides context for card inputs. All card input components must be nested inside this.
<primer-input-card-number>Secure hosted input for card number with automatic card network detection.
<primer-input-card-expiry>Secure hosted input for expiration date (MM/YY).
<primer-input-cvv>Secure hosted input for card security code.
<primer-input-cardholder-name>Input field for cardholder name.
<primer-card-form-submit>Submit button with built-in loading and disabled states.
<primer-input-label>Label component for card inputs.
<primer-input-wrapper>Wrapper for styling and layout of card inputs.
<primer-billing-address>Collects billing address information for card payments.

Utility components

ComponentDescription
<primer-error-message-container>Displays payment error messages after failed transactions.

Configuration & events

ReferenceDescription
SDK OptionsComplete reference of all configuration options (locale, card, vault, applePay, etc.)
Events ReferenceAll events (primer:ready, primer:state-change, primer:payment-success, primer:payment-failure) and SDK instance methods
Styling VariablesCSS variables for theming (--primer-color-brand, --primer-radius-medium, etc.)

I want to…See
Set up checkout<primer-checkout>
Build a custom card form<primer-card-form>
Display saved payment methods<primer-vault-manager>
Handle payment success/failureEvents Reference
Customize appearanceStyling Variables
Configure SDK behaviorSDK Options