Composable that renders available payment methods with customizable header and item slots. Handles surcharge grouping automatically.Documentation Index
Fetch the complete documentation index at: https://primer.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Signature
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
controller | PrimerPaymentMethodsController | Required | Controller providing available payment methods |
modifier | Modifier | Modifier | Modifier applied to the root container |
header | @Composable () -> Unit | PaymentMethodsDefaults.SectionHeader() | Slot for section header above the list |
method | @Composable (PrimerPaymentMethod, () -> Unit) -> Unit | PaymentMethodsDefaults.Method(...) | Slot for each payment method item. Receives method data and onClick callback. |
Default behavior
Renders a “Pay with” header, a vertical list of methods with icon, name, and optional surcharge, and groups methods by surcharge amount. ShowsPaymentMethodsDefaults.EmptyState() when no methods are available.