Inttegro Swift SDK
The Inttegro Swift SDK is the official typed, asynchronous client for Swift services on macOS and Linux. It is separate from the iOS payment-sheet SDK and must never be embedded in a customer-facing app with a secret API key.
Install
Add the signed package release to Package.swift:
dependencies: [
.package(
url: "https://github.com/inttegro/inttegro-sdk-swift",
from: "0.7.0"
),
]
Link the Inttegro product from the inttegro-sdk-swift package to your
server target.
Create a client
import Foundation
import Inttegro
let client = try Client(
apiKey: ProcessInfo.processInfo.environment["INTTEGRO_API_KEY"]!
)
let order = try await client.orders.lookup(
.init(orderId: "order_...")
)
print(order.id)
Resource methods return domain values such as Order and Payout; HTTP
response envelopes stay private.
Observability and error reporting
Pass application-owned implementations of Telemetry and ErrorReporter to
Client. The SDK emits safe request lifecycle events to the telemetry hook and
delivers a prepared ErrorReport only when a reporter is configured.
let client = try Client(
apiKey: apiKey,
telemetry: telemetry,
errorReporter: errorReporter
)
The callbacks receive no API keys, bodies, resource identifiers, or raw error messages. Without an error reporter, the SDK does no report preparation work.