---
title: ".NET SDK"
description: "Install, use, and observe the official Inttegro SDK for .NET."
canonical: "https://studio.inttegro.com/sdks/dotnet"
format: inttegro-machine-docs/v1
language: "Ruby"
sdk_version: "v10.0.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/ruby/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: 1592
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

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

### Five questions

#### Q1. When should the reader use .NET 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/ruby/api.md) and [See complete demo applications](https://studio.inttegro.com/machine/ruby/demos.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/ruby/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/ruby/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 .NET SDK

The [Inttegro .NET SDK](https://github.com/inttegro/inttegro-sdk-dotnet)
builds server-side integrations with nullable-aware domain types, public enum
constants, asynchronous resource methods, and cancellation support.

:::tip Start with MCP

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

:::

## Install

The SDK targets [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).
Until the package is available from
[NuGet](https://learn.microsoft.com/en-us/nuget/what-is-nuget), 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/ruby/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

```csharp
using Inttegro;

var apiKey = Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")
    ?? throw new InvalidOperationException("INTTEGRO_API_KEY is required");

using var inttegro = new InttegroClient(apiKey);
```

Resource methods return domain objects directly and support
[`CancellationToken`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
for request cancellation and deadlines.

## Observability

Register the SDK's `ActivitySource` with the
[OpenTelemetry pipeline](https://opentelemetry.io/docs/languages/dotnet/) owned
by your application. The same source can also be consumed directly with the
.NET diagnostics API:

```csharp
using System.Diagnostics;
using Inttegro;

using var listener = new ActivityListener
{
    ShouldListenTo = source => source.Name == InttegroClient.ActivitySourceName,
    Sample = (ref ActivityCreationOptions<ActivityContext> _) =>
        ActivitySamplingResult.AllDataAndRecorded,
    ActivityStopped = activity =>
    {
        _ = activity; // Forward the completed activity to your tracing pipeline.
    },
};
ActivitySource.AddActivityListener(listener);
```

> 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:

```csharp
using Inttegro;
using Inttegro.Diagnostics;

ErrorReporter enqueueError = report =>
{
    _ = report; // Forward the report to your collector or queue.
};

using var inttegro = new InttegroClient(
    apiKey: Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!,
    errorReporter: enqueueError
);
```

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

## Continue

- [Browse the generated API reference](https://dotnet.inttegro.dev/v10.3.0/)
- [Browse the source and signed releases](https://github.com/inttegro/inttegro-sdk-dotnet)
- [See complete demo applications](https://studio.inttegro.com/machine/ruby/demos.md)
- [Choose an API resource](https://studio.inttegro.com/machine/ruby/api.md)
