OpenPayments.Types.InteractionResponse (open_payments_elixir v1.0.0)

Copy Markdown View Source

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.

Summary

Functions

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

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

Revalidates typed interaction instructions without retaining rejected values in errors.

Types

t()

@type t() :: %OpenPayments.Types.InteractionResponse{
  extensions: %{optional(String.t()) => term()},
  finish: String.t(),
  redirect: String.t()
}

Functions

from_map(data)

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

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

to_map(interaction)

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

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

validate(interaction)

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

Revalidates typed interaction instructions without retaining rejected values in errors.