finaX Logo
API Reference
Guides

Credit Notes

Learn how to create credit notes for refunds and reversals using the finaX e-invoicing API.

A credit note is an e-invoice used to reverse or cancel a previous invoice - typically for refunds, returns, or billing corrections. In the EN16931 standard, credit notes are identified by invoice type code 381.

Note: Credit note amounts should be entered as positive values. The invoice type code 381 already indicates that the document is a credit note - no additional negative sign is required.

Key Differences from Regular Invoices

When creating a credit note, you only need to change two things compared to a regular invoice:

  1. Set invoice_type_code to 381 (instead of 380 for a commercial invoice)
  2. Include preceding_invoice_reference to link to the original invoice being credited

Minimal Example

The following example shows the key fields that differentiate a credit note from a regular invoice:

credit-note.json
{
  "invoice_number": "CN-2026-001",
  "invoice_issue_date": "2026-01-22",
  "invoice_type_code": 381,
  "invoice_currency_code": "EUR",
  "payment_due_date": "2026-02-22",
  "buyer_reference": "PO-12345",
  "preceding_invoice_reference": [
    {
      "preceding_invoice_reference": "INV-2025-789",
      "preceding_invoice_issue_date": "2025-12-15"
    }
  ],
  "seller": {
    "name": "Seller Company GmbH",
    "identifier": [{
        "value": "DE123123",
        "scheme_identifier": "0094"
    }],
    "vat_identifier": "DE-123",
    "postal_address": {
      "city": "Berlin",
      "post_code": "10115",
      "country_code": "DE"
    },
    "electronic_address": {
      "value": "seller@example.com",
      "scheme_identifier": "EM"
    },
    "contact": {
      "point": "Billing Department",
      "telephone_number": "+49 30 1234567",
      "email_address": "billing@seller.com"
    }
  },
  "buyer": {
    "name": "Buyer Corp",
    "postal_address": {
      "city": "Munich",
      "post_code": "80331",
      "country_code": "DE"
    },
    "electronic_address": {
      "value": "buyer@example.com",
      "scheme_identifier": "EM"
    }
  },
  "payment_instructions": {
    "payment_means_type_code": "30",
    "credit_transfer": [
      {
        "payment_account_identifier": "DE89370400440532013000"
      }
    ]
  },
  "invoice_line": [
    {
      "invoice_line_identifier": "1",
      "invoiced_quantity": 1,
      "invoiced_quantity_unit_of_measure_code": "C62",
      "invoice_line_net_amount": 100.00,
      "item_name": "Refund for returned goods",
      "item_net_price": 100.00,
      "item_information": {
        "name": "Item name"
      },
      "price_details": {
        "item_net_price": 100
      },
      "line_vat_information": {
        "invoiced_item_vat_category_code": "S",
        "invoiced_item_vat_rate": 19
      }
    }
  ],
  "document_totals": {
    "sum_of_invoice_line_net_amount": 100.00,
    "invoice_total_amount_without_vat": 100.00,
    "invoice_total_vat_amount": 19.00,
    "invoice_total_amount_with_vat": 119.00,
    "amount_due_for_payment": 119.00
  },
  "vat_breakdown": [
    {
      "vat_category_taxable_amount": 100.00,
      "vat_category_tax_amount": 19.00,
      "vat_category_code": "S",
      "vat_category_rate": 19
    }
  ]
}

API Behavior

When you POST a credit note (type 381) to the /v1/xml/ubl endpoint, the API automatically generates a UBL CreditNote document instead of an Invoice:

  • Root element: <CreditNote> (instead of <Invoice>)
  • Type code element: <CreditNoteTypeCode> (instead of <InvoiceTypeCode>)
  • Line elements: <CreditNoteLine> (instead of <InvoiceLine>)

The CII format (/v1/xml/cii) uses the same payload structure - the type code 381 in the XML indicates it's a credit note.

Best Practice: Always include preceding_invoice_reference when creating credit notes. While not strictly required for type 381, it helps the recipient match the credit note to the original invoice and is required by some receiving systems.