# `Tipalti`
[🔗](https://github.com/iamkanishka/tipalti/blob/main/lib/tipalti.ex#L1)

A production-grade Elixir client for the full Tipalti API surface.

Tipalti exposes three separate API families, and this package speaks all
three through one consistent, idiomatic interface:

  * **Modern REST API** (`Tipalti.Payees`, `Tipalti.Invoices`, `Tipalti.Payments`)
    — OAuth 2.0 client-credentials auth, JSON, resource-oriented URLs.
  * **Legacy SOAP API** (`Tipalti.SOAP.Payee`, `Tipalti.SOAP.Payer`)
    — HMAC-SHA256 signed requests, XML, the original Payee/Payer function set.
  * **Procurement REST API** (`Tipalti.Procurement.PurchaseOrders`,
    `Tipalti.Procurement.Employees`) — static API-key auth, purchase order
    sync and employee import for Tipalti's procurement product.

## Quick start

    config = Tipalti.Config.new(
      mode: :sandbox,
      rest: [client_id: "...", client_secret: "..."],
      soap: [payer_name: "...", api_key: "..."],
      procurement: [api_key: "..."]
    )

    {:ok, payees} = Tipalti.Payees.list(config)

    {:ok, response} =
      Tipalti.SOAP.Payer.process_payments(config, [
        %{idap: "vendor-123", amount: 100.00, currency: "USD"}
      ])

    {:ok, pos} = Tipalti.Procurement.PurchaseOrders.list(config)

Every read/write function has a raising `!` counterpart (e.g.
`Tipalti.Payees.list!/2`), and list endpoints that paginate expose a
`stream/2` variant that lazily walks every page — see `Tipalti.Pagination`.

See `Tipalti.Config` for the full set of configuration options and
`Tipalti.Error` for the exception hierarchy raised/returned by every call.

---

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