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

An incoming payment returned without an access token.

Accepts the pinned `incoming-payment-without-access-token` schema and the
minimal public shape used by the Node SDK and deployed servers: `authServer`
with optional `receivedAmount`. Minimal responses leave detail fields nil.
If any detail field is present, the complete pinned response is required,
including unique payment methods. Amounts and ILP methods become typed structs.
Omitted optional fields become nil; explicit nulls are invalid. Additional JSON
fields are preserved in `extensions`.

URI fields and RFC 3339 timestamps remain strings with their original spelling,
offsets and fractional precision. Timestamp validation checks calendar/clock
bounds; leap-second notation must fall in the final UTC minute of a month,
without consulting a historical leap-second table. It does not compare expiration to creation or
current time. Schema validation does not compare amounts or asset identities.

Inspection omits payment methods and extensions. Explicit map/JSON exports
include ILP shared secrets and must be treated as sensitive. This type makes
no requests. Validate manually constructed or modified structs with `validate/1`;
`to_map/1` converts their shape without validating it.

# `t`

```elixir
@type t() :: %OpenPayments.Types.PublicIncomingPayment{
  auth_server: String.t(),
  completed: boolean() | nil,
  created_at: String.t() | nil,
  expires_at: String.t() | nil,
  extensions: %{optional(String.t()) =&gt; term()},
  id: String.t() | nil,
  incoming_amount: OpenPayments.Types.Amount.t() | nil,
  methods: [OpenPayments.Types.ILPPaymentMethod.t()] | nil,
  received_amount: OpenPayments.Types.Amount.t() | nil
}
```

# `from_map`

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

Decodes a full pinned response or minimal public authorization information.

# `to_map`

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

Converts supplied protocol fields, including method secrets, without validating.

# `validate`

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

Validates a full or minimal struct, treating nil optional fields as omitted.

---

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