---
title: "Go SDK"
description: "Install, use, and observe the official Inttegro SDK for Go."
canonical: "https://studio.inttegro.com/sdks/go"
format: inttegro-machine-docs/v1
language: "Python"
sdk_version: "v12.0.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/python/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: 565
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: 1901
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

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

### Five questions

#### Q1. When should the reader use Go 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/python/api.md) and [Go invoice portal demo](https://studio.inttegro.com/machine/python/demos/go.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/python/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/python/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 Go SDK

The [Inttegro Go SDK](https://go.inttegro.dev/v11.0.1/)
builds server-side integrations with typed request and domain structs, exported
API constants, context-aware operations, and a client that can be shared safely
across goroutines.

:::tip Start with MCP

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

:::

## Install

The SDK requires [Go 1.25 or newer](https://go.dev/doc/install). Add the module
to your application:

```bash
go get github.com/inttegro/inttegro-sdk-go/v11
```

:::warning Keep the SDK on the server

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

:::

## Create a client

```go
package main

import (
	"os"

	inttegro "github.com/inttegro/inttegro-sdk-go/v11"
)

func main() {
	client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
	_ = client
}
```

Every resource operation accepts
[`context.Context`](https://pkg.go.dev/context#Context), so callers can
propagate deadlines and cancellation through Inttegro requests.

## Use resource packages

Import the singular package for each API resource. Its primary object repeats
the package name, such as `product.Product`, `payment.Payment`, or `order.Order`;
supporting names include `product.TypeDigital`, `purchaseintent.StatusActive`,
and `refund.CreateParams`. The root package continues to own the client,
transport options, errors, and other cross-cutting features.

```go
package main

import (
	"context"
	"log"
	"os"

	inttegro "github.com/inttegro/inttegro-sdk-go/v11"
	"github.com/inttegro/inttegro-sdk-go/v11/product"
	"github.com/inttegro/inttegro-sdk-go/v11/purchaseintent"
)

func main() {
	ctx := context.Background()
	client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

	createdProduct, err := client.Products.Create(ctx, product.CreateParams{
		Type: product.TypeDigital,
		Name: "Field guide",
	})
	if err != nil {
		log.Fatal(err)
	}
	_ = createdProduct

	intent, err := client.PurchaseIntents.Lookup(ctx, "sale_123")
	if err != nil {
		log.Fatal(err)
	}
	if intent.Status == purchaseintent.StatusActive {
		// The Buy link can accept an order.
	}
}
```

Version 7 defines resource types in their singular resource packages. It does
not mirror those declarations in the root package; import each resource package
whose types or constants your integration uses.

## See it in a complete app

The [Go invoice portal demo](https://studio.inttegro.com/machine/python/demos/go.md) shows how a service business can let
clients review an invoice and pay it through Inttegro Checkout. Follow the
guide to run the app and see how the Go server turns an invoice into a payable
order without moving credentials or pricing decisions into the browser.

## Observability

The global [OpenTelemetry provider and propagator](https://opentelemetry.io/docs/languages/go/)
are used automatically. Pass client options when you manage them explicitly:

```go
client := inttegro.NewClient(
	os.Getenv("INTTEGRO_API_KEY"),
	inttegro.WithTracerProvider(tracerProvider),
	inttegro.WithTextMapPropagator(propagation.TraceContext{}),
)
```

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

### Report SDK failures

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

```go
package main

import (
	"context"
	"os"

	inttegro "github.com/inttegro/inttegro-sdk-go/v11"
)

func enqueueError(_ context.Context, _ inttegro.ErrorReport) {
	// Forward the report to your collector or queue.
}

func main() {
	client := inttegro.NewClient(
		os.Getenv("INTTEGRO_API_KEY"),
		inttegro.WithErrorReporter(enqueueError),
	)
	_ = client
}
```

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

## Continue

- [Browse the generated API reference](https://go.inttegro.dev/v11.0.1/)
- [Browse the source and releases](https://github.com/inttegro/inttegro-sdk-go)
- [Run the Go invoice portal](https://studio.inttegro.com/machine/python/demos/go.md)
- [Choose an API resource](https://studio.inttegro.com/machine/python/api.md)
