Skip to main content

Inttegro Elixir SDK

The Inttegro Elixir SDK is the official typed client for BEAM applications and services. Resource functions return domain structs such as Inttegro.Order; HTTP response envelopes stay private.

Developer preview

The package is not published on Hex yet. Pin the exact Git revision below; the guide will move to the registry package after its first release.

Install

defp deps do
[
{:inttegro,
git: "https://github.com/zebodotdev/inttegro-sdk-elixir",
ref: "e0028403eba63ab2a08e0447cae05a01e961b116"}
]
end

Create a client

client = Inttegro.Client.new!(System.fetch_env!("INTTEGRO_API_KEY"))
request = Inttegro.LookupOrderRequest.new!(order_id: "order_...")

{:ok, order} = Inttegro.Orders.lookup(client, request)
IO.puts(order.id)

Observability and error reporting

Pass application-owned functions when creating the client:

client =
Inttegro.Client.new!(api_key,
telemetry: &MyApp.InttegroTelemetry.record/1,
error_reporter: &MyApp.InttegroErrors.report/1
)

The callbacks receive safe lifecycle metadata without API keys, bodies, resource identifiers, or raw error messages. No error report is prepared when :error_reporter is omitted.

Continue