> ## 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.

# API Reference

> Complete API reference for the Primer Checkout Android SDK

> [!WARNING]
>
> Primer Checkout Android SDK is currently in **beta** (v3.0.0-beta.8).
> The API is subject to change before the stable release.

## Core API

| Component | Description |
| - | - |
| [`PrimerCheckoutController`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/primer-checkout-controller) | Main checkout session controller with state observation and actions |
| [`PrimerCheckoutState`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/primer-checkout-state) | Unified checkout state — lifecycle (`Loading`, `Ready`), session updates, and terminal outcomes (`Success`, `Failure`) |
| [`Payment outcomes`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/primer-checkout-event) | How `Success` / `Failure` and `PrimerCheckoutData` are surfaced through `PrimerCheckoutState` |
| [`PrimerCheckoutSheet`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/primer-checkout-sheet) | Modal bottom sheet composable with built-in navigation and screen slots |
| [`PrimerCheckoutHost`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/primer-checkout-host) | Inline host composable for embedding checkout components in your layout |

## Card Form

| Component | Description |
| - | - |
| [`PrimerCardForm`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/card-form/primer-card-form) | Card payment form composable with slot-based layout |
| [`PrimerCardFormController`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/card-form/card-form-controller) | Card form state holder with field data, validation, and submit action |
| [`CardFormDefaults`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/card-form/card-form-defaults) | Pre-built field components for custom card form layouts |
| [Card Field Components](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/card-form/card-field-components.md) | Individual field composables (`CardNumberField`, `ExpiryField`, `CvvField`, etc.) |

## Payment Methods

| Component | Description |
| - | - |
| [`PrimerPaymentMethods`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/payment-methods/primer-payment-methods) | Payment method list composable |
| [`PrimerPaymentMethodsController`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/payment-methods/payment-methods-controller) | Payment methods state holder with available methods |
| [`PaymentMethodsDefaults`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/payment-methods/payment-methods-defaults) | Pre-built sub-components for custom payment method layouts |
| [`PrimerVaultedPaymentMethodsController`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/payment-methods/vaulted-payment-methods-controller) | Saved payment methods state holder with select, delete, and management |

## Theming

| Component | Description |
| - | - |
| [`PrimerTheme`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/theming/primer-theme) | Root theme container holding all design token groups |
| [`LightColorTokens` / `DarkColorTokens`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/theming/color-tokens) | Color tokens for light and dark mode |
| [`SpacingTokens`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/theming/spacing-tokens) | Spacing values for padding and margins |
| [`TypographyTokens` / `TypographyStyle`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/theming/typography-tokens) | Font sizes, weights, and line heights |
| [`RadiusTokens` / `WidthTokens` / `SizeTokens`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/theming/shape-tokens) | Corner radius, border widths, and component sizes |

## Common Objects

| Component | Description |
| - | - |
| [`PrimerSettings`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/common/primer-settings) | SDK configuration (payment handling mode, options) |
| [`PrimerError`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/common/primer-error) | Error details with diagnostics ID and recovery suggestion |
| [`Validation`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/common/validation-result) | Field validation result with error details |
| [`PrimerCardNetwork`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/common/primer-card-network) | Card network type for co-badged card selection |
| [`PrimerCountry`](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/common/primer-country) | Country data class and selection controller for billing address |

## Controller pattern

All stateful components follow the same `remember*` controller pattern:

```kotlin theme={"dark"}
val checkout = rememberPrimerCheckoutController(clientToken)
val cardFormController = rememberCardFormController(checkout)
val paymentMethodsController = rememberPaymentMethodsController(checkout)
val vaultedMethodsController = rememberVaultedPaymentMethodsController(checkout)
```

Each controller is created with a `remember*` composable function, exposes state via `StateFlow`, and provides action methods.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.