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.
Controller interface for the payment method list. Exposes available methods as observable state and provides selection.

Creation

@Composable
fun rememberPaymentMethodsController(
    checkout: PrimerCheckoutController,
): PrimerPaymentMethodsController
ParameterTypeDescription
checkoutPrimerCheckoutControllerCheckout controller from rememberPrimerCheckoutController()
Must be called inside PrimerCheckoutHost content or a PrimerCheckoutSheet slot.

Property

PropertyTypeDescription
methodsStateFlow<List<PrimerPaymentMethod>>Available payment methods for the current session. Updates on checkout.refresh().

Method

MethodDescription
select(method: PrimerPaymentMethod)Selects a payment method to begin its payment flow (card form, redirect, native wallet, etc.)

PrimerPaymentMethod

data class PrimerPaymentMethod(
    val paymentMethodType: String,
    val paymentMethodName: String?,
    val surcharge: Surcharge?,
    val supportedPrimerSessionIntents: List<PrimerSessionIntent>,
    val paymentMethodManagerCategories: List<PrimerPaymentMethodManagerCategory>,
)
PropertyTypeDescription
paymentMethodTypeStringPayment method identifier (e.g., "PAYMENT_CARD", "PAYPAL", "GOOGLE_PAY")
paymentMethodNameString?Human-readable display name
surchargeSurcharge?Surcharge amount, or null if none
supportedPrimerSessionIntentsList<PrimerSessionIntent>Session intents supported by this payment method
paymentMethodManagerCategoriesList<PrimerPaymentMethodManagerCategory>Manager categories for this payment method

Common payment method types

TypeDescription
"PAYMENT_CARD"Credit/debit card
"PAYPAL"PayPal
"GOOGLE_PAY"Google Pay
"KLARNA"Klarna
"APPLE_PAY"Apple Pay
"IDEAL"iDEAL
"BANCONTACT"Bancontact
"SOFORT"Sofort/Klarna Pay Now