# `Payzum.Payments`
[🔗](https://github.com/payzum-dev/payzum-elixir/blob/main/lib/payzum.ex#L37)

Invoices on the merchant surface.

# `create`

```elixir
@spec create(Payzum.Client.t(), map()) :: {:ok, map()} | {:error, Exception.t()}
```

Create an invoice.

Amounts are strings so nothing is rounded on the way in. `pay_currency` accepts
an NP code (`usdttrc20`), a bare symbol combined with `network`, or `"all"` to
let the buyer pick.

Returns `{:error, %Payzum.Errors.MissingInvoiceUrl{}}` when the 201 carries no
checkout URL: the draft exists, so read it by payment id.

# `get`

```elixir
@spec get(Payzum.Client.t(), String.t()) :: {:ok, map()} | {:error, Exception.t()}
```

Read one invoice by Payzum payment_id or by your own order_id.

# `list`

```elixir
@spec list(Payzum.Client.t(), keyword()) :: {:ok, map()} | {:error, Exception.t()}
```

List invoices, newest first by default.

The arguments are validated strictly, because the server silently falls back to
`created_at` for an unrecognised sort, which turns a typo into quietly wrong
ordering.

---

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