Holds credentials and connection settings for all three Tipalti API
families. Build one with new/1 and pass it as the first argument to
every Tipalti.* function.
Nothing here is validated eagerly against Tipalti's servers — validation is limited to shape/presence checks so that misconfiguration fails fast, locally, with a clear message instead of a confusing HTTP error.
Summary
Functions
Builds a new Tipalti.Config.
Types
@type mode() :: :sandbox | :production
@type procurement_opts() :: [{:api_key, String.t()}]
@type t() :: %Tipalti.Config{ max_retries: non_neg_integer(), mode: mode(), procurement: %{optional(:api_key) => String.t()}, procurement_base_url: String.t(), receive_timeout: pos_integer(), rest: %{ optional(:client_id) => String.t(), optional(:client_secret) => String.t() }, rest_base_url: String.t(), soap: %{optional(:payer_name) => String.t(), optional(:api_key) => String.t()}, soap_base_url: String.t(), soap_version: String.t(), telemetry_prefix: [atom()] }
Functions
Builds a new Tipalti.Config.
Options
:mode—:sandbox(default) or:production. Selects the default base URL for every API family unless overridden below.:rest—[client_id: ..., client_secret: ...]for the modern OAuth2 REST API.:soap—[payer_name: ..., api_key: ...]for the legacy SOAP API.:procurement—[api_key: ...]for the Procurement REST API.:rest_base_url,:soap_base_url,:procurement_base_url— override the computed base URL for that API family (useful for tests or self-hosted proxies).:soap_version— SOAP endpoint version segment, defaults to"v11".:receive_timeout— per-request timeout in milliseconds (default30_000).:max_retries— retry attempts for idempotent/safe requests on transient failures (default3).
Only the sections you actually use need to be populated — e.g. a config
built with only :soap opts is fine as long as you only call
Tipalti.SOAP.* functions with it.