Primer Checkout Android SDK is currently in beta (v3.0.0-beta.2).
The API is subject to change before the stable release.
Core API
| Component | Description |
|---|
PrimerCheckoutController | Main checkout session controller with state observation and actions |
PrimerCheckoutState | Sealed interface representing checkout lifecycle states (Loading, Ready) |
PrimerCheckoutEvent | Sealed interface for payment outcome events (Success, Failure) |
PrimerCheckoutSheet | Modal bottom sheet composable with built-in navigation and screen slots |
PrimerCheckoutHost | Inline host composable for embedding checkout components in your layout |
| Component | Description |
|---|
PrimerCardForm | Card payment form composable with slot-based layout |
PrimerCardFormController | Card form state holder with field data, validation, and submit action |
CardFormDefaults | Pre-built field components for custom card form layouts |
| Card Field Components | Individual field composables (CardNumberField, ExpiryField, CvvField, etc.) |
Payment Methods
| Component | Description |
|---|
PrimerPaymentMethods | Payment method list composable |
PrimerPaymentMethodsController | Payment methods state holder with available methods |
PaymentMethodsDefaults | Pre-built sub-components for custom payment method layouts |
PrimerVaultedPaymentMethodsController | Saved payment methods state holder with select, delete, and management |
Theming
| Component | Description |
|---|
PrimerTheme | Root theme container holding all design token groups |
LightColorTokens / DarkColorTokens | Color tokens for light and dark mode |
SpacingTokens | Spacing values for padding and margins |
TypographyTokens / TypographyStyle | Font sizes, weights, and line heights |
RadiusTokens / BorderWidthTokens / SizeTokens | Corner radius, border widths, and component sizes |
Common Objects
| Component | Description |
|---|
PrimerSettings | SDK configuration (payment handling mode, options) |
PrimerError | Error details with diagnostics ID and recovery suggestion |
Validation | Field validation result with error details |
PrimerCardNetwork | Card network type for co-badged card selection |
PrimerCountry | Country data class and selection controller for billing address |
Controller pattern
All stateful components follow the same remember* controller pattern:
val checkout = rememberPrimerCheckoutController(clientToken)
val cardFormController = rememberCardFormController(checkout)
val paymentMethodsController = rememberPaymentMethodsController(checkout)
val vaultedMethodsController = rememberVaultedPaymentMethodsController(checkout)
Each controller is created with a remember* composable function, exposes state via StateFlow, and provides action methods.