What is a Primer Checkout component?
Primer Checkout is built from reusable UI components. Each component represents a specific part of the checkout experience — such as the payment method selector, the card form, or the pay button — and is designed to be configured, styled, and combined without rewriting payment logic. You don’t build a checkout from scratch. You assemble and customize trusted building blocks.What this means for you
Using Primer Checkout components allows you to:- Integrate a full checkout UI without managing sensitive payment inputs
- Customize layout and appearance without breaking functionality
- Keep a predictable and stable integration over time
- Upgrade components without refactoring your application
Styling model
- Web
- Android
- iOS
Each Primer component uses Shadow DOM, which isolates its internal HTML and CSS from your application.You cannot style internal component elements with CSS selectors. Instead, Primer exposes CSS variables as the official customization API:This allows safe customization, consistent theming, and runtime updates without rebuilding components.
Content and layout customization
Each platform provides a way to customize the content and layout of checkout components.- Web
- Android
- iOS
Slots are named placeholders inside Web Components:
Communication: events
Primer Checkout uses an event-driven architecture to communicate with your application.- Web
- Android
- iOS
Standard DOM events work with any framework:
For details, see the Events Guide.
| Event | When it fires |
|---|---|
primer:ready | SDK is initialized and ready |
primer:state-change | Checkout state changes |
primer:payment-success | Payment completed successfully |
primer:payment-failure | Payment failed |
What the SDK handles
Primer Checkout handles this for you:- Payment method logic and processor communication
- Input validation and error display
- 3DS challenges and redirect flows
- Loading states and visual feedback
- Security and PCI compliance
Key takeaways
- Primer Checkout is built from reusable, isolated components
- Customization happens through configuration, layout customization, and styling tokens
- Events provide decoupled communication between your app and the SDK
See also
Styling
Customize colors, fonts, and spacing
Layout
Control component arrangement and layout
Events
Handle payment lifecycle events
Components
Explore all available components