Tipalti.Invoices (tipalti_client v1.0.0)

Copy Markdown View Source

Modern REST API — invoice/bill submission and management. See the caveat in Tipalti.Payees about endpoint-shape assumptions; the same applies here.

Summary

Functions

Cancels a pending invoice.

Creates a new invoice/bill.

Retrieves a single invoice by ID.

Lists invoices. Returns a single page; see stream/2 to walk every page.

Returns a lazy Stream of every invoice across all pages.

Updates an existing (not-yet-paid) invoice.

Functions

cancel(config, invoice_id)

@spec cancel(Tipalti.Config.t(), String.t()) :: {:ok, map()} | {:error, Exception.t()}

Cancels a pending invoice.

cancel!(config, invoice_id)

@spec cancel!(Tipalti.Config.t(), String.t()) :: map()

create(config, attrs)

@spec create(Tipalti.Config.t(), map()) :: {:ok, map()} | {:error, Exception.t()}

Creates a new invoice/bill.

Tipalti.Invoices.create(config, %{
  payee_id: "vendor-123",
  ref_code: "INV-2026-001",
  due_date: "2026-08-30",
  currency: "USD",
  line_items: [%{description: "Consulting", amount: "1500.00", quantity: 1}]
})

create!(config, attrs)

@spec create!(Tipalti.Config.t(), map()) :: map()

get(config, invoice_id)

@spec get(Tipalti.Config.t(), String.t()) :: {:ok, map()} | {:error, Exception.t()}

Retrieves a single invoice by ID.

get!(config, invoice_id)

@spec get!(Tipalti.Config.t(), String.t()) :: map()

list(config, opts \\ [])

@spec list(
  Tipalti.Config.t(),
  keyword()
) :: {:ok, map()} | {:error, Exception.t()}

Lists invoices. Returns a single page; see stream/2 to walk every page.

list!(config, opts \\ [])

@spec list!(
  Tipalti.Config.t(),
  keyword()
) :: map()

stream(config, opts \\ [])

@spec stream(
  Tipalti.Config.t(),
  keyword()
) :: Enumerable.t()

Returns a lazy Stream of every invoice across all pages.

update(config, invoice_id, attrs)

@spec update(Tipalti.Config.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Exception.t()}

Updates an existing (not-yet-paid) invoice.

update!(config, invoice_id, attrs)

@spec update!(Tipalti.Config.t(), String.t(), map()) :: map()