---
title: "Java SDK"
description: "Install, use, and observe the official Inttegro SDK for Java."
canonical: "https://studio.inttegro.com/sdks/java"
format: inttegro-machine-docs/v1
language: "TypeScript"
sdk_version: "v12.0.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/typescript/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 575
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: ["get_integration_guide","check_integration_readiness"]
estimated_tokens: 1653
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Install, use, and observe the official Inttegro SDK for Java. This TypeScript representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. When should the reader use Java SDK?

Use this SDK guide when the selected runtime or framework matches the application being built.

#### Q2. What is authoritative on this page?

Use this page for orientation; follow its canonical SDK, guide, API, or MCP links for exact contracts.

#### Q3. What page-specific constraint matters most?

Use the current documented SDK version and native public API; do not invent members from JSON names or another language.

#### Q4. Can Inttegro MCP materially help with this task?

Yes, when the reader has an authenticated MCP connection and the task needs live context, guided planning, or a supported operation. The strongest matches are `get_integration_guide`, `check_integration_readiness`; their exact roles and boundaries are listed below.

#### Q5. How should the reader verify the answer and continue?

Install the documented version, compile or type-check the smallest example, run it against a disposable application, and verify the resulting resource through its canonical lookup. Continue with [Choose an API resource](https://studio.inttegro.com/machine/typescript/api.md) and [Spring Boot invoice portal demo](https://studio.inttegro.com/machine/typescript/demos/spring-boot.md) when those concerns enter scope.

### Recommended MCP assistance

Use these through an authenticated Inttegro MCP connection. This document remains the contract source.

- [`get_integration_guide`](https://studio.inttegro.com/machine/typescript/inttegro-mcp/tools.md#get_integration_guide) — read-only integration guidance. Returns a focused implementation sequence and canonical Studio links for authentication, checkout, orders, catalog, messaging, idempotency, or testing.
- [`check_integration_readiness`](https://studio.inttegro.com/machine/typescript/inttegro-mcp/tools.md#check_integration_readiness) — read-only integration guidance. Audits platform secret storage, server-runtime compatibility, idempotency, errors, state verification, checkout returns, and messaging consent without receiving source code or credentials.

## Document content

# Inttegro Java SDK

The [Inttegro Java SDK](https://github.com/inttegro/inttegro-sdk-java) builds
server-side integrations with typed request builders, domain objects and enums,
and Java's native
[`HttpClient`](https://docs.oracle.com/en/java/javase/17/docs/api/java.net.http/java/net/http/HttpClient.html).
A configured client can be shared safely across threads.

:::tip Start with MCP

Before writing SDK code, [connect your MCP client](https://studio.inttegro.com/machine/typescript/inttegro-mcp/connect.md) and ask
MCP to [design the integration](https://studio.inttegro.com/machine/typescript/inttegro-mcp/design-integration.md) for
your Java application. Use the resulting implementation and test plan to guide
the code you write with this SDK.

:::

## Install

The SDK requires [Java 17 or newer](https://dev.java/learn/getting-started/).
Until the package is available from
[Maven Central](https://central.sonatype.org/consume/), use the tagged source
release on GitHub.

:::warning Keep the SDK on the server

[Load the secret API key securely](https://studio.inttegro.com/machine/typescript/api/authentication.md#store-credentials-safely)
from server-side code. Never package the key in a desktop or mobile application,
browser code, or source control.

:::

## Create a client

```java
import com.inttegro.Client;

public class Example {
    public static void main(String[] args) {
        Client inttegro = new Client(System.getenv("INTTEGRO_API_KEY"));
    }
}
```

Resource clients use methods such as `orders()`, `customers()`, and
`refunds()`. Request types expose fluent builders for their supported fields.

## See it in a complete app

The [Spring Boot invoice portal demo](https://studio.inttegro.com/machine/typescript/demos/spring-boot.md) shows how a service
business can give clients a clear place to review and pay outstanding invoices.
Follow the guide to see the Java SDK create the order behind a Spring MVC
checkout and hand payment to Inttegro Checkout.

## Observability

Java's global [OpenTelemetry](https://opentelemetry.io/docs/languages/java/)
instance is used automatically. Inject an application-owned instance when you
manage the tracing pipeline explicitly:

```java
Client inttegro = new Client(
    System.getenv("INTTEGRO_API_KEY"),
    "https://api.inttegro.com",
    httpClient,
    openTelemetry
);
```

> Server Sdk Observability is interactive content. Use the canonical page to view it.

### Report SDK failures

Pass an application-owned callback to receive one immutable, typed report after
an SDK operation finally fails:

```java
import com.inttegro.Client;
import com.inttegro.diagnostics.ErrorReport;

public class Example {
    public static void main(String[] args) {
        Client inttegro = new Client(
            System.getenv("INTTEGRO_API_KEY"),
            (ErrorReport report) -> enqueueError(report)
        );
    }

    private static void enqueueError(ErrorReport report) {
        // Forward the report to your collector or queue.
    }
}
```

> Server Sdk Error Reporting is interactive content. Use the canonical page to view it.

## Continue

- [Browse the generated API reference](https://java.inttegro.dev/v8.3.0/)
- [Browse the source and signed releases](https://github.com/inttegro/inttegro-sdk-java)
- [Run the Spring Boot invoice portal](https://studio.inttegro.com/machine/typescript/demos/spring-boot.md)
- [Choose an API resource](https://studio.inttegro.com/machine/typescript/api.md)
