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
| State | Description |
|---|
Loading | SDK is initializing — fetching configuration and payment methods. Initial state and re-entered on refresh(). |
Ready | Checkout is fully initialized and ready for payment. Contains clientSession data. |
Ready properties
| Property | Type | Description |
|---|
clientSession | PrimerClientSession | Session data containing order details, currency, and customer information |
PrimerClientSession
data class PrimerClientSession(
val totalAmount: Int?,
val currencyCode: String?,
val customerId: String?,
val orderId: String?,
)
| Property | Type | Description |
|---|
totalAmount | Int? | Total amount in minor currency units (e.g., 1000 = $10.00) |
currencyCode | String? | ISO 4217 currency code (e.g., "USD", "EUR") |
customerId | String? | Customer identifier from your system |
orderId | String? | Order identifier from your system |