Moov.Invoices (Moov v1.0.0)

Copy Markdown View Source

Create and manage invoices. Added in API version v2026.04.00.

Invoice status values: "draft", "unpaid", "payment-pending", "paid", "overdue", "canceled".

See https://docs.moov.io/api/money-movement/invoices/.

Summary

Functions

Creates a payment resource against an invoice (records a payment toward it).

Deletes a draft invoice.

Retrieves a single invoice.

Lists invoices for an account.

Lists payments recorded against an invoice.

Updates an invoice (e.g. its due date, line items, or status while still a draft).

Functions

create(client, account_id, params)

@spec create(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Creates an invoice.

params: :line_items, :due_date, :customer_account_id (or recipient contact info for a non-Moov customer), :memo, :metadata.

create_payment(client, account_id, invoice_id, params)

@spec create_payment(Moov.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Creates a payment resource against an invoice (records a payment toward it).

delete(client, account_id, invoice_id)

@spec delete(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, term()} | {:error, Moov.Error.t()}

Deletes a draft invoice.

get(client, account_id, invoice_id)

@spec get(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a single invoice.

list(client, account_id, opts \\ [])

@spec list(Moov.Client.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists invoices for an account.

list_payments(client, account_id, invoice_id, opts \\ [])

@spec list_payments(Moov.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists payments recorded against an invoice.

update(client, account_id, invoice_id, params)

@spec update(Moov.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Updates an invoice (e.g. its due date, line items, or status while still a draft).