Skip to content

Quickstart: your first e-invoice in five minutes

Using the Fakturnaut app? Go to the app help

What the API does, what it costs and how to start: Overview for software vendors

Explained step by step, with the mandatory fields and the validation report: Create an XRechnung via API

You need curl, a free account and about five minutes. Everything here runs in the sandbox: test documents are valid XRechnung, marked as test, never billed and deleted after 30 days.

  1. Sign up at /registrieren and confirm your e-mail address.
  2. Create a seller in the portal under Sellers: the company that issues the invoices (name, address, VAT ID, bank account). For the Peppol step below give it a Peppol address, e.g. scheme 9930 with its VAT ID.
  3. Create a test key in the portal under API keys: choose Test. It starts with fkn_test_ and is shown once.
export KEY=fkn_test_…                      # your test key
export BASE=https://api.fakturnaut.com/v1
SELLER=$(curl -s "$BASE/sellers?size=1" -H "Authorization: Bearer $KEY" | jq -r '.items[0].id')
  1. Validate an invoice (nothing is stored). The buyer below is a German public authority with a Leitweg-ID.
cat > invoice.json <<JSON
{"sellerId": "$SELLER", "number": "RE-2026-0001", "issueDate": "2026-10-19", "dueDate": "2026-11-18",
 "deliveryDate": "2026-10-19",
 "buyerReference": "04011000-12345-03",
 "buyer": {"name": "Stadt Beispiel", "electronicAddress": "04011000-12345-03", "electronicAddressScheme": "0204",
           "address": {"street": "Rathausplatz 1", "city": "Köln", "postCode": "50667", "country": "DE"}},
 "lines": [{"name": "Beratung", "quantity": 10, "unitCode": "HUR", "netPrice": 100.00, "vatRate": 19}]}
JSON
curl -s -X POST $BASE/invoices/validate -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' --data @invoice.json
# → {"valid": true, "totals": {"amountDue": 1190.00, …}, "findings": []}
  1. Issue it. The Idempotency-Key makes retries safe.
curl -s -X POST $BASE/invoices -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $(uuidgen)" --data @invoice.json
# → 201 {"id": "…", "documents": [{"format": "xrechnung-ubl", …}, {"format": "xrechnung-cii", …},
#        {"format": "zugferd", …}]}
  1. Download the XRechnung and deliver it over Peppol (simulated in the sandbox):
curl -s -OJ "$BASE/invoices/<id>/document?format=xrechnung-ubl" -H "Authorization: Bearer $KEY"
curl -s -X POST $BASE/invoices/<id>/deliveries -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' -d '{"channel":"peppol","recipient":"0204:04011000-12345-03"}'

Done. Every endpoint is described in the API reference, which you can download as OpenAPI to generate a client. Or use one of our SDKs:

npm install @fakturnaut/sdk            # TypeScript / JavaScript
composer require fakturnaut/sdk        # PHP
dotnet add package Fakturnaut.Sdk      # C# / .NET
<!-- Java (Maven) -->
<dependency>
  <groupId>com.fakturnaut</groupId>
  <artifactId>fakturnaut-sdk</artifactId>
  <version>1.0.0</version>
</dependency>

When you go live, create a live key and verify your seller.