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
| Function | Description |
|---|
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 |
@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,
)
| Parameter | Type | Description |
|---|
method | PrimerPaymentMethod | Payment method data to display |
onClick | () -> Unit | Callback 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.