FIX.Platform.Client
1.14.20
See the version list below for details.
dotnet add package FIX.Platform.Client --version 1.14.20
NuGet\Install-Package FIX.Platform.Client -Version 1.14.20
<PackageReference Include="FIX.Platform.Client" Version="1.14.20" />
<PackageVersion Include="FIX.Platform.Client" Version="1.14.20" />
<PackageReference Include="FIX.Platform.Client" />
paket add FIX.Platform.Client --version 1.14.20
#r "nuget: FIX.Platform.Client, 1.14.20"
#:package FIX.Platform.Client@1.14.20
#addin nuget:?package=FIX.Platform.Client&version=1.14.20
#tool nuget:?package=FIX.Platform.Client&version=1.14.20
FIX.Platform.Client
Official .NET client for the FIX Fiscal platform API.
Install
dotnet add package FIX.Platform.Client
Usage
using FIX.Platform.Client;
using FIX.Platform.Client.Generated;
using FIX.Platform.Models.Domain;
using FIX.Platform.Models.Enums;
using FIX.Platform.Models.Types;
// Runnable Quickstart for FIX.Platform.Client. Set FIX_API_KEY before running:
// $env:FIX_API_KEY = "fix_..." (PowerShell)
// export FIX_API_KEY=fix_... (bash)
// Get a key from your organization's FIX dashboard, or via fix.ApiKeys once authenticated another way.
var apiKey = Environment.GetEnvironmentVariable("FIX_API_KEY");
if (string.IsNullOrEmpty(apiKey))
{
Console.WriteLine("Set the FIX_API_KEY environment variable to a real API key before running this sample.");
return;
}
FixCore fix = new("https://go.fixfiscal.ro", apiKey); // baseUrl shown for clarity, it is the default
var receipt = new Receipt.Emit
{
Kind = ReceiptType.Fiscal,
Lines =
[
new SaleLine.Emit
{
Item = new Item.Snapshot { Name = "Bottled water" },
SaleIdentifier = "SKU-001",
GrossUnitPrice = new MonetaryAmount { Amount = 119m, CurrencyCode = "RON" },
Vat = VatRate.RoNormal_2025,
}
],
Payments =
[
new PaymentRecord.CreateRequest
{
Amount = new MonetaryAmount { Amount = 119m, CurrencyCode = "RON" },
Method = PaymentMethod.BankCard,
Status = PaymentStatus.Paid,
ProcessingDateTime = DateTime.UtcNow,
}
],
};
Console.WriteLine("Emitting receipt...");
try
{
var emitted = await fix.Receipt.EmitAsync(receipt);
Console.WriteLine($"Emitted: {emitted}");
}
catch (ApiException<ProblemDetails> ex)
{
// Typed errors: ApiException<T> carries the deserialized error body (ProblemDetails, ValidationProblem, ...).
Console.WriteLine($"{ex.StatusCode} {ex.Result.Title}: {ex.Result.Detail}");
}
catch (ApiException ex)
{
// ReadResponseAsString defaults to false per generated client (skips buffering the raw body); opt in per-client
// when you need it, e.g.: fix.Receipt.ReadResponseAsString = true;
Console.WriteLine($"{ex.StatusCode} {ex.Message}");
}
fix.Dispose();
Get an API key from your organization's FIX dashboard (Settings → Account), or issue one programmatically via
fix.ApiKeys once authenticated another way. A key acts as its owning user. When pinned to an organization, it is
already scoped to that organization; when unpinned, pass the target organization via X-Organization-Id when needed.
Every controller on the platform is exposed as a property on FixCore (fix.Receipt, fix.FiscalEntity,
fix.Item, fix.Tenant, ...). For a controller without a dedicated property, construct its generated client
directly: fix.GetApiClient<SaleChannelClient>().
Models and SmartEnums
Requests and responses are the platform's own types from the FIX.Platform.Models package (installed with this one),
nested under their entity: Receipt.Emit, Receipt.GetResponse, SaleLine.Emit, PaymentRecord.CreateRequest, ...
Enumerations are SmartEnums: use them like enums, and read the behavior they carry directly from the value.
var method = PaymentMethod.BankCard; // assign like an enum member
var parsed = PaymentMethod.FromName("BankCard"); // or TryFromName / FromValue
foreach (var rate in VatRate.List) // every member
Console.WriteLine($"{rate.Name}: {rate.Rate}"); // members carry their data (rate, flags, codes)
They serialize by name ("BankCard"), exactly as the API documents them.
Notes
- The generated clients (under the
FIX.Platform.Client.Generatednamespace) are regenerated from the platform's OpenAPI document on every FIX.Platform.Backend build — do not hand-edit them. - Failures throw
FIX.Platform.Client.Generated.ApiException, carrying the HTTP status code and response body.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FIX.Platform.Models (>= 1.14.20)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.