Skip to main content
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

ComponentDescription
PrimerCheckoutControllerMain checkout session controller with state observation and actions
PrimerCheckoutStateSealed interface representing checkout lifecycle states (Loading, Ready)
PrimerCheckoutEventSealed interface for payment outcome events (Success, Failure)
PrimerCheckoutSheetModal bottom sheet composable with built-in navigation and screen slots
PrimerCheckoutHostInline host composable for embedding checkout components in your layout

Card Form

ComponentDescription
PrimerCardFormCard payment form composable with slot-based layout
PrimerCardFormControllerCard form state holder with field data, validation, and submit action
CardFormDefaultsPre-built field components for custom card form layouts
Card Field ComponentsIndividual field composables (CardNumberField, ExpiryField, CvvField, etc.)

Payment Methods

ComponentDescription
PrimerPaymentMethodsPayment method list composable
PrimerPaymentMethodsControllerPayment methods state holder with available methods
PaymentMethodsDefaultsPre-built sub-components for custom payment method layouts
PrimerVaultedPaymentMethodsControllerSaved payment methods state holder with select, delete, and management

Theming

ComponentDescription
PrimerThemeRoot theme container holding all design token groups
LightColorTokens / DarkColorTokensColor tokens for light and dark mode
SpacingTokensSpacing values for padding and margins
TypographyTokens / TypographyStyleFont sizes, weights, and line heights
RadiusTokens / BorderWidthTokens / SizeTokensCorner radius, border widths, and component sizes

Common Objects

ComponentDescription
PrimerSettingsSDK configuration (payment handling mode, options)
PrimerErrorError details with diagnostics ID and recovery suggestion
ValidationField validation result with error details
PrimerCardNetworkCard network type for co-badged card selection
PrimerCountryCountry 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.