# `LatticeStripe.Tax.Registration`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v2.2.2/lib/lattice_stripe/tax/registration.ex#L1)

Stripe Tax Registration objects for declaring where you collect tax.

## Does not register with tax authorities

Creating a registration via `create/3` **does not register you with tax
authorities**. It tells Stripe which jurisdictions you are configured to
collect tax in so calculations and reporting can run. Legal registration
with government agencies remains your responsibility.

## Relationship to other tax surfaces

Registrations work alongside `LatticeStripe.Tax.Settings` (account defaults)
and `LatticeStripe.Tax.Calculation` (ephemeral tax amounts). This module is
**not** `LatticeStripe.Invoice.AutomaticTax`. Tax filing, returns, and
threshold monitoring are **out of SDK scope**.

## `country_options`

Registration params require a nested `country_options` map keyed by
lowercase ISO country codes that match the top-level `"country"` field.
For US state sales tax:

    %{
      "country" => "US",
      "country_options" => %{
        "us" => %{"type" => "state_sales_tax", "state" => "CA"}
      }
    }

For EU OSS:

    %{
      "country" => "DE",
      "country_options" => %{
        "de" => %{"type" => "oss_union", "oss_union" => "standard"}
      }
    }

Do **not** pass `type` at the top level of the create params — it belongs
inside the country-specific nested map.

## Usage

    {:ok, registration} =
      LatticeStripe.Tax.Registration.create(client, %{
        "country" => "US",
        "country_options" => %{
          "us" => %{"type" => "state_sales_tax", "state" => "CA"}
        }
      })

    {:ok, response} = LatticeStripe.Tax.Registration.list(client)

## Pagination

`list/3` returns a single page of results as `%LatticeStripe.List{}`.
`%LatticeStripe.List{}` is not `Enumerable`. For many jurisdictions, use
`stream!/3`, which auto-paginates and yields `%Registration{}` structs.

See [Standalone Tax API](guides/tax.md) for the canonical calculate → record → reverse workflow.

See [Stripe Tax Registrations](https://docs.stripe.com/api/tax/registrations).

# `t`

```elixir
@type t() :: %LatticeStripe.Tax.Registration{
  active_from: integer() | nil,
  country: String.t() | nil,
  country_options: map() | nil,
  created: integer() | nil,
  expires_at: integer() | nil,
  extra: map(),
  id: String.t() | nil,
  livemode: boolean() | nil,
  object: String.t(),
  status: atom() | String.t() | nil
}
```

# `create`

```elixir
@spec create(LatticeStripe.Client.t(), map(), keyword()) ::
  {:ok, t()} | {:error, LatticeStripe.Error.t()}
```

Creates a Tax Registration.

Sends `POST /v1/tax/registrations` with the raw params map.

# `create!`

```elixir
@spec create!(LatticeStripe.Client.t(), map(), keyword()) :: t()
```

Like `create/3` but raises on failure.

# `list`

```elixir
@spec list(LatticeStripe.Client.t(), map(), keyword()) ::
  {:ok, LatticeStripe.Response.t()} | {:error, LatticeStripe.Error.t()}
```

Lists Tax Registrations with optional filters.

# `list!`

```elixir
@spec list!(LatticeStripe.Client.t(), map(), keyword()) :: LatticeStripe.Response.t()
```

Like `list/3` but raises on failure.

# `retrieve`

```elixir
@spec retrieve(LatticeStripe.Client.t(), String.t(), keyword()) ::
  {:ok, t()} | {:error, LatticeStripe.Error.t()}
```

Retrieves a Tax Registration by ID.

# `retrieve!`

```elixir
@spec retrieve!(LatticeStripe.Client.t(), String.t(), keyword()) :: t()
```

Like `retrieve/3` but raises on failure.

# `stream!`

```elixir
@spec stream!(LatticeStripe.Client.t(), map(), keyword()) :: Enumerable.t()
```

Returns a lazy stream of Tax Registrations matching the given filters.

# `update`

```elixir
@spec update(LatticeStripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, t()} | {:error, LatticeStripe.Error.t()}
```

Updates a Tax Registration by ID.

# `update!`

```elixir
@spec update!(LatticeStripe.Client.t(), String.t(), map(), keyword()) :: t()
```

Like `update/4` but raises on failure.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
