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

# PrimerCountry

> Country data class and selection controller for billing address forms

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

Represents a country in the billing address form. Used by `PrimerCardFormController` for country selection.

## Definition

```kotlin theme={"dark"}
data class PrimerCountry(
    val name: String,
    val code: CountryCode,
)
```

## Properties

| Property | Type | Description |
| - | - | - |
| `name` | `String` | Human-readable country name (e.g., `"United States"`, `"Germany"`) |
| `code` | `CountryCode` | ISO 3166-1 alpha-2 country code enum (249 values) |

## CountryCode

ISO 3166-1 alpha-2 enum with 249 country codes. Examples:

| Value | Country |
| - | - |
| `CountryCode.US` | United States |
| `CountryCode.GB` | United Kingdom |
| `CountryCode.DE` | Germany |
| `CountryCode.FR` | France |
| `CountryCode.JP` | Japan |
| `CountryCode.AU` | Australia |

## Card form integration

Country selection is part of the card form billing address flow:

```kotlin theme={"dark"}
val cardFormController = rememberCardFormController(checkout)
val state by cardFormController.state.collectAsStateWithLifecycle()

val selectedCountry: PrimerCountry? = state.selectedCountry

cardFormController.requestCountrySelection()
```

Calling `requestCountrySelection()` opens the country picker. The selected country appears in `state.selectedCountry`.

See [PrimerCardFormController](https://primer.io/docs/sdk/android-checkout/v3.0.0-beta/api/card-form/card-form-controller.md) for full card form API.


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