The optional JSON payload for continuing a grant.
The pinned schema permits an empty object or an optional interact_ref string.
Omission becomes nil; explicit JSON null is rejected. Reference spelling is
preserved without UUID, alphabet or length constraints. Additional JSON fields
are retained in extensions. The wire name remains interact_ref.
Unlike the Node SDK's TypeScript Required body type, this codec permits an
empty object as declared by the shared schema. It models a JSON object only:
from_map(nil) is invalid, while OpenPayments.Grant.continue/2 omits the HTTP
body separately. An empty struct exports as an empty JSON object.
Inspection omits reference and extension values. Explicit map/JSON exports
include them. This codec does not generate references, verify callback hashes,
wait, poll or send requests. Use validate/1 after modifying a struct;
to_map/1 converts shape without validating it.
Summary
Functions
Decodes an optional interaction reference and permitted JSON extension fields.
Converts to protocol fields, including any interaction reference, without validating.
Revalidates typed payload data, treating a nil reference as omitted.
Types
Functions
@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}
Decodes an optional interaction reference and permitted JSON extension fields.
Converts to protocol fields, including any interaction reference, without validating.
@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}
Revalidates typed payload data, treating a nil reference as omitted.