Developers
OpenAPI ↗
Go to the app
Documentation / Integrations
API v1 · Integrations

.NET SDK & examples

Start with the .NET client and run a full webhook receiver.

On this page

First invoice with .NET

Download console example with SDK, Contracts and invoice.jsonUnpack the ZIP, install the .NET 10 SDK and set REBILIX_API_KEY locally on a sandbox key with the right generate and read.

PowerShell · im entpackten Verzeichnis
$env:REBILIX_API_URL = "https://app.rebilix.de"
$requestId = [guid]::NewGuid().ToString()
dotnet run --project examples/Rebilix.Sdk.Example -- examples/invoice.json $requestId

The client generates TEST-RE-000001, displays the document ID and loads the available artifacts at rebilix-sandbox-output The file names contain the same ID and original or reportFor a reappearance with identical data, keep $requestId at

Open the same files in Rebilix

Creating a client

Rebilix.Sdk and Rebilix.Api.Contracts 0.3.0 supports .NET 8+. The receiver example uses ASP.NET Core 10 and SQL Server.

The SDK sources are included in the download and are built by project reference. Publication on NuGet is not required. Alternatively, 0.3.0 packages already generated locally can be integrated via your own package feed.

C# · Client
using Rebilix.Sdk;

using var handler = new HttpClientHandler { AllowAutoRedirect = false };
using var http = new HttpClient(handler) {
    Timeout = TimeSpan.FromMinutes(5)
};
var client = new RebilixClient(http, new Uri(baseUrl), apiKey);
var job = await client.QueueGenerationAsync(invoice, stableRequestId, ct);
// job.Id bei Ihrem ERP-Datensatz speichern.
// Nach Webhook / Polling aktuellen Job und Ergebnis abrufen.

Reuse HttpClient, disable redirects and obtain keys from a secret store on the server side. The client does not own HttpClient and does not perform silent repetitions.

Methods by task

TaskSDK methods
DocumentsGenerateAsync, ParseAsync, ValidateAsync, GetDocumentAsync, DownloadAsync
ConversionReviewConversionAsync, GetConversionReviewAsync, DownloadConversionReviewAsync, ConfirmConversionAsync
BackgroundQueueGenerationAsync, QueueParsingAsync, QueueValidationAsync, QueueConversionReviewAsync, GetJobAsync, GetJobsAsync, DownloadJobInputAsync, RetryJobAsync
WebhooksRebilixWebhook.Verify, GetWebhookDeliveriesAsync, GetWebhookDeliveryAsync, RetryWebhookDeliveryAsync

RebilixApiException contains StatusCode, Problem, RequestId and RetryAfter. Conversions are only confirmed after explicit review.

Download the full receiver

ASP.NET Core Webhook ReceiverSource code · SQL Server Inbox · SDK & Contracts · German Step-by-Step Guide

The example verifies original bytes and signature, verifies workspace/environment, and stores the event before HTTP 200. A worker reads the current Rebilix job status and updates a local status projection along with the processed mark in a transaction.

A unique event key prevents duplicates. SQL leases allow restart after restart. Five local processing attempts; failed inbox records are retained for diagnosis; no invoices are issued, confirmed, paid for, or emailed.

EXAMPLE EXAMPLE

  1. Unpack ZIP. .NET 10 SDK and SQL Server; on Windows, LocalDB is preset.
  2. In the list: examples/Rebilix.WebhookReceiver Use your own example database.
  3. Configure Workspace ID, Environment, Signature Secret, and Read-Right API Keys. Use User Secrets for Local Secrets; productively use your Secret Store.
  4. Explicitly initialize the database and start the receiver, and the following commands apply to PowerShell.
PowerShell · Einrichtung
cd examples/Rebilix.WebhookReceiver
$env:ASPNETCORE_ENVIRONMENT = "Development"
dotnet user-secrets set "Receiver:WorkspaceId" "<Workspace-UUID>"
dotnet user-secrets set "Receiver:SigningSecret" "<whsec_...>"
dotnet user-secrets set "Receiver:ApiKey" "<rbx_test_...>"
dotnet run -- --initialize-db
dotnet run -- --urls http://localhost:5305

The placeholders must be replaced by your values. User Secrets is a local development store, not an encrypted production secret store. ConnectionStrings:Receiver and Receiver:ApiOrigin Overwrite.

Local port is not the webhook URL.

Register a public HTTPS host on port 443 that forwards to the receiver. http://localhost:5305 serves only for local launch; Rebilix does not call private network destinations.

After a sandbox job, the SQL tables show Inbox and Jobs Reception and processing. The README contains diagnostic queries, retrieval and instructions for integration into a real ERP transaction.

The connection is restored...

New connection attempt in seconds.

The connection could not be restored.
Please try again or reload the page.

Your meeting was paused.

The sitting could not be continued.
Please try again or reload the page.