Skip to main content

Extract data from credit notes

A credit note runs the invoice backwards. It is the document a supplier issues to reduce what a buyer owes: goods came back damaged, a post-invoice discount was agreed, a quantity was overbilled. In the UNTDID 1001 code list its type is 381, and while it looks like an invoice and carries positive amounts, an accounts payable system reads it as a reduction to apply against the referenced invoice or a balance to refund. The figure that matters on a credit note is the amount to be given back, and it has to trace to a specific original. A credit note names the preceding invoice number and its date, states the reason for the credit, and lists each credited line with the quantity returned and its net price. VAT is credited at the same category and rate the original charged, so a return of twelve units credits both the goods value and the tax that rode on it. The buyer's cost centre reference tells the ledger which account to reverse. Talonic returns the credit note as a structured reversal tied to its source invoice. A credit note dated 2026-06-18 from Alpen Möbelwerk GmbH to Benelux Contract BV, raised against invoice INV-2026-04471 of 2026-06-02 for twelve chairs returned damaged in transit, returns one credited line of 780.00 EUR, a 19% VAT credit of 148.20 EUR, and a total credit of 928.20 EUR that the buyer applies to the open balance or receives as a refund.

What gets extracted from credit notes

Document NumberCN-2026-0331
Document Type Code381UNTDID 1001, credit note
Preceding Invoice NumberINV-2026-04471
Reason for CreditReturn of 12 units damaged in transit
IssuerAlpen Möbelwerk GmbH
BuyerBenelux Contract BV
Credited Lines1 line: item, returned quantity, net price, VAT rate
Tax Credited148.20 EUR
Total Credit928.20 EUR

How extraction works for credit notes

Credit notes arrive from the same billing systems that raise invoices, and the danger is treating one as a new charge rather than a reversal. Talonic classifies the document against the EN 16931 semantic model and reads the invoice type code, the preceding invoice number, the reference document date, and the reason for credit, so the credit is posted against the right invoice and never double counts. Credited lines keep their returned quantity, net price in the note's ISO 4217 currency, VAT category, and rate, and the credited VAT is totalled to match the tax credit and the total credit. Canonical field names resolve through the Field Registry that also maps commercial invoices, and each value carries a confidence score with pixel-region provenance under DIN SPEC 91491, so a payables reviewer confirms a return against the source note before applying the credit.

Sample extraction

A credit note for returned goods against an earlier invoice

{
  "document_number": "CN-2026-0331",
  "document_date": "2026-06-18",
  "invoice_type_code": "381",
  "preceding_invoice_number": "INV-2026-04471",
  "reference_document_date": "2026-06-02",
  "reason_for_credit": "Return of 12 units damaged in transit",
  "supplier": {
    "name": "Alpen Möbelwerk GmbH",
    "tax_id": "DE314159265",
    "city": "Rosenheim",
    "country_code": "DE"
  },
  "buyer": {
    "name": "Benelux Contract BV",
    "tax_id": "NL861234567B01",
    "city": "Eindhoven",
    "country_code": "NL"
  },
  "currency": "EUR",
  "line_items": [
    {
      "line_id": "1",
      "item_name": "Oak conference chair",
      "quantity": 12,
      "quantity_unit_code": "C62",
      "item_net_price": 65,
      "line_net_amount": 780,
      "item_vat_category_code": "S",
      "item_vat_rate": 19
    }
  ],
  "subtotal": 780,
  "total_amount_without_vat": 780,
  "vat_breakdown": [
    {
      "vat_category_code": "S",
      "vat_category_taxable_amount": 780,
      "vat_category_rate": 19,
      "vat_category_tax_amount": 148.2
    }
  ],
  "tax_amount": 148.2,
  "total_amount": 928.2,
  "amount_due": 928.2
}

Frequently asked

Why does a credit note carry positive amounts?

Under the EN 16931 model a credit note states positive figures and is identified by document type code 381; the accounts payable system treats it as a reduction against the referenced invoice rather than negating each line, which is why the preceding invoice number is captured first.

How is the credited VAT handled?

VAT is credited at the category and rate the original invoice charged, so a return credits both the goods value and the tax on it. The credited VAT is totalled to match the tax credit and the total credit, and a mismatch is flagged.

Does it record the reason for the credit?

The reason for credit, such as a return, an overbilled quantity, or a post-invoice discount, is captured as its own field, so a reviewer sees why the credit was issued without reading the free-text body.

Can the credit be traced to a general-ledger account?

The buyer accounting reference (cost centre) and the purchase order reference are captured, so the reversal posts to the same account the original charge hit.

Author note

Reviewed by Talonic engineering · last reviewed 2026-07-06