Validate a German invoice
Check the German invoice fields, buyer reference and amounts before submission. Use the returned validation errors to correct a rejected GETS payload.
Checks before submission
The required fields depend on whether you send a tax invoice, credit note or debit note and on any modifiers. Use the Germany field reference for GETS paths; these name the standard invoice fields, not elements in the generated XML.
In the field reference’s Table view, check Requirement, Type, Description and Enums. Requirement covers all document types, modifiers and variants; read Description for conditional requirements. Choose List with sample request to select your document type, modifiers and variant and see the applicable fields beside a sample request.
| Check | What to correct |
|---|---|
| Invoice identity | Supply an invoice number, issue date, currency and matching documentType.base in the envelope and payload. Use an invoice number you have not already sent. |
| Parties | Include seller and buyer names, countries, cities and postal codes. Supply the seller contact’s name, email and phone; enter a seller tax identifier when the VAT treatment requires one. |
| Buyer reference | Supply a buyer accounting reference or a Leitweg-ID as applicable. For an invoice to a German public authority, get the buyer’s Leitweg-ID and send it in extensions.de_leitwegId; the buyer uses it for routing. A domestic B2B invoice generally does not require a Leitweg-ID. |
| Items and totals | Supply each line’s identity, description, quantity, unit, net price, tax category, tax amount and line total. Check that line values, tax and invoice totals agree; supply a positive tax rate for a standard-rated (S) line. |
| Payment | Include a payment method. A bank-transfer payment needs the payee’s account identifier; direct debit needs its applicable account and creditor details. |
These checks reflect the fields and conditions you send through GETS. The current public XRechnung specification and Peppol billing rules provide the authoritative rules for their respective formats. Check the recipient’s submission requirements as well; passing the API’s validation is not proof that a public-sector recipient has accepted the invoice.
Read a rejection
If POST /api/v3/unify returns HTTP 422, inspect every entry in errors. getsPath names the field to correct in GETS; payloadPath points to your submitted payload. message describes the problem, and code identifies a published rule when one is available. For example, if totals.amountDue is missing, add the amount payable and check it against the invoice totals before retrying. See Unify errors for the response fields and other statuses.
If the API returns 200, retain documentId and follow the document status to learn whether delivery succeeds.
Last updated