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.
Object providing pre-built composable functions for each part of the payment methods list.

Components

FunctionDescription
SectionHeader()Default “Pay with” header styled with the current theme
Method(method: PrimerPaymentMethod, onClick: () -> Unit)Payment method item with icon, name, optional surcharge, and chevron
EmptyState(modifier: Modifier = Modifier)Message displayed when no payment methods are available

SectionHeader

@Composable
fun PaymentMethodsDefaults.SectionHeader()
Renders “Pay with” text using the current theme’s typography and color tokens.

Method

@Composable
fun PaymentMethodsDefaults.Method(
    method: PrimerPaymentMethod,
    onClick: () -> Unit,
)
ParameterTypeDescription
methodPrimerPaymentMethodPayment method data to display
onClick() -> UnitCallback when tapped. Typically calls controller.select(method).

EmptyState

@Composable
fun PaymentMethodsDefaults.EmptyState(
    modifier: Modifier = Modifier,
)
Rendered automatically by PrimerPaymentMethods when the controller.methods list is empty.