Search by

Fakturnaut API client: issue, validate, deliver and check EN 16931 e-invoices (XRechnung, ZUGFeRD, RO e-Factura).

v1.0.0 2026-10-24 11:30 UTC

This package is auto-updated.

Last update: 2026-10-25 12:24:01 UTC


README

PHP client for the Fakturnaut API: issue, validate, deliver and check EN 16931 e-invoices (XRechnung, ZUGFeRD, RO e-Factura). PHP 8.1 or newer, Guzzle 7.

composer require fakturnaut/sdk
use Fakturnaut\Sdk\Api\InvoicesApi;
use Fakturnaut\Sdk\Configuration;
use Fakturnaut\Sdk\Helpers\Idempotency;
use Fakturnaut\Sdk\Model\InvoiceRequest;

$config = Configuration::getDefaultConfiguration()->setAccessToken(getenv('FAKTURNAUT_KEY')); // fkn_test_… = sandbox
$invoices = new InvoicesApi(null, $config);
$issued = $invoices->issueInvoice(new InvoiceRequest([/* sellerId, number, buyer, lines … */]), Idempotency::newKey());

Errors throw Fakturnaut\Sdk\ApiException; getResponseBody() is an RFC 9457 problem with a stable code.

Webhooks

use Fakturnaut\Sdk\Helpers\Webhooks;

$ok = Webhooks::verify(
    file_get_contents('php://input'),
    $_SERVER['HTTP_EINVOICE_TIMESTAMP'] ?? null,
    $_SERVER['HTTP_EINVOICE_SIGNATURE'] ?? null,
    getenv('FAKTURNAUT_WEBHOOK_SECRET')
);

Generated from api/openapi.json; do not edit lib/Api or lib/Model by hand. Tests: vendor/bin/phpunit.