# `OpenPayments.Types.InteractionFinish`
[🔗](https://github.com/interledger/open-payments-elixir/blob/v1.0.0/lib/open_payments/types/interaction_finish.ex#L1)

A grant interaction request's completion callback configuration.

The pinned schema requires method `redirect`, an absolute callback `uri` and a
string `nonce`. Additional JSON fields are preserved in `extensions`.
The caller must supply a unique, unguessable nonce for each grant request;
this data codec checks its type without generating or assessing its randomness.

URI spelling is preserved without HTTP request-target restrictions. Inspection
omits the nonce and extensions; explicit map/JSON exports include them for the
protocol. This type does not follow redirects or verify a callback hash.

Struct literals can bypass validation. Call `validate/1` after constructing or
modifying a struct; `to_map/1` converts its shape without validating it.

# `t`

```elixir
@type t() :: %OpenPayments.Types.InteractionFinish{
  extensions: %{optional(String.t()) =&gt; term()},
  method: String.t(),
  nonce: String.t(),
  uri: String.t()
}
```

# `from_map`

```elixir
@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}
```

Decodes and validates interaction callback configuration.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Converts to protocol fields, including the nonce, without validating.

# `validate`

```elixir
@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}
```

Validates a callback configuration without retaining rejected field values.

---

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