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.
Sealed interface representing the lifecycle of a checkout session. Observe via PrimerCheckoutController.state.

Definition

@Immutable
sealed interface PrimerCheckoutState {

    data object Loading : PrimerCheckoutState

    data class Ready(
        val clientSession: PrimerClientSession,
    ) : PrimerCheckoutState
}

States

StateDescription
LoadingSDK is initializing — fetching configuration and payment methods. Initial state and re-entered on refresh().
ReadyCheckout is fully initialized and ready for payment. Contains clientSession data.

Ready properties

PropertyTypeDescription
clientSessionPrimerClientSessionSession data containing order details, currency, and customer information

PrimerClientSession

data class PrimerClientSession(
    val totalAmount: Int?,
    val currencyCode: String?,
    val customerId: String?,
    val orderId: String?,
)
PropertyTypeDescription
totalAmountInt?Total amount in minor currency units (e.g., 1000 = $10.00)
currencyCodeString?ISO 4217 currency code (e.g., "USD", "EUR")
customerIdString?Customer identifier from your system
orderIdString?Order identifier from your system