Generate Factur-X Invoices with C#

Learn how to easily integrate GoFX into your C# stack.

Dealing with complex XML generation in C# can be extremely tedious. GoFX abstracts all the EN16931 complexity away. Send a simple JSON payload and get a perfectly compliant hybrid PDF back in milliseconds.

Ecosystem Focus

Integrating Factur-X / EN16931 within the C# ecosystem is now seamless. Avoid building complex XML DOMs manually and let GoFX handle the heavy lifting. Generate hybrid PDF/A-3 invoices directly via our REST API.

Prerequisites

Ensure you have .NET Core 3.1+ configured in your environment to make outbound HTTP POST requests to the GoFX API.

> Code Example
using var client = new HttpClient();
var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.gofx.app/v1/invoice/generate", content);
var pdfBytes = await response.Content.ReadAsByteArrayAsync();
await File.WriteAllBytesAsync("facture.pdf", pdfBytes);