XRechnung Credit Note API
A XRechnung credit note uses the same endpoint and the same request as a XRechnung invoice,
POST /v1/create/xrechnung. Set typeCode to
381 and the API returns a validated credit note.
Example
Send the request body you send for an invoice, with the type code and a reference to the invoice being credited:
{
"invoice": {
"invoiceNumber": "CN-2026-0007",
"typeCode": "381",
"precedingInvoiceReferences": [
{ "reference": "INV-2026-0042", "issueDate": "2026-11-14" }
],
...
}
}
The top-level object stays invoice, and the seller, buyer and lines are filled in exactly as for an invoice.
For a complete example and integration guide, see the Create XRechnung endpoint.
Amounts stay positive
Send quantities, prices and amounts as positive values, exactly as on an invoice. The type code
381 already tells the receiving system that the document is a credit,
so it books the amounts on the credit side. Totals and the VAT breakdown are calculated from the lines, as for an invoice.
A line that works against the credit, for example a restocking fee deducted from it, gets a negative
quantity. The price itself always stays positive.
Reference to the original invoice
precedingInvoiceReferences (BG-3) names the invoice the credit note refers to:
its number in reference and, optionally, its date in
issueDate. It is optional, and we recommend including it: your customer
can match the credit to the invoice without asking. A credit note covering several invoices lists each of them.
Self-billed credit notes
When the buyer issues the document on the seller's behalf, as in self-billing, credit a self-billed invoice
(389) with type code 261. Everything else on this page applies unchanged.
Credit notes in XRechnung
381 is one of the type codes the German XRechnung rules (BR-DE-17) accept, so a credit note is validated against the same KoSIT rule set as an invoice. The XRechnung requirements apply unchanged, including the Leitweg-ID in buyerReference. A self-billed credit note (261) is accepted with a BR-DE-17 warning.
One endpoint for invoices and credit notes
A credit note is an invoice with type code 381. You issue it with the same
endpoint, POST /v1/create/xrechnung, the same request model and the same
code you already use for your invoices. The full request model, the options, code examples in several
languages and the responses are on the
Create XRechnung endpoint page.