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

Interaction instructions in a pending grant response's `interact` field.

Required `redirect` follows the schema's absolute-URI format and retains its
spelling. Required `finish` is an opaque string used to secure the callback;
this codec checks its type without imposing UUID, length or alphabet rules.
Additional JSON fields are retained in `extensions`.

Inspection omits redirect, finish and extension values. Explicit map/JSON
exports include them. This type does not open the consent URI, generate callback
values or verify a callback hash. Validate manually modified structs with
`validate/1`; `to_map/1` converts shape without validating it.

# `t`

```elixir
@type t() :: %OpenPayments.Types.InteractionResponse{
  extensions: %{optional(String.t()) =&gt; term()},
  finish: String.t(),
  redirect: String.t()
}
```

# `from_map`

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

Decodes interaction instructions without following the redirect or verifying a callback.

# `to_map`

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

Converts to protocol fields, including callback values, without validating.

# `validate`

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

Revalidates typed interaction instructions without retaining rejected values in errors.

---

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