Tipalti.Payments (tipalti_client v1.0.0)

Copy Markdown View Source

Modern REST API — mass payout initiation and tracking. See the caveat in Tipalti.Payees about endpoint-shape assumptions; the same applies here.

Summary

Functions

Cancels a payment that hasn't yet been processed.

Initiates a batch of payments in a single call.

Retrieves a single payment by ID.

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

Returns a lazy Stream of every payment across all pages.

Functions

cancel(config, payment_id)

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

Cancels a payment that hasn't yet been processed.

cancel!(config, payment_id)

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

create_batch(config, payments)

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

Initiates a batch of payments in a single call.

Tipalti.Payments.create_batch(config, [
  %{payee_id: "vendor-123", amount: "100.00", currency: "USD", ref_code: "PAY-1"},
  %{payee_id: "vendor-456", amount: "250.00", currency: "USD", ref_code: "PAY-2"}
])

create_batch!(config, payments)

@spec create_batch!(Tipalti.Config.t(), [map()]) :: map()

get(config, payment_id)

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

Retrieves a single payment by ID.

get!(config, payment_id)

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

list(config, opts \\ [])

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

Lists payments. 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 payment across all pages.