This article describes the minimum requirements for sending UBL invoices to the Semine DocFlow system. Use this as a starting point for your integration.
SEMINE supports receiving and processing electronic invoices and credit notes that comply with PEPPOL BIS Billing 3.0 (UBL 2.1). This includes all valid EHF invoices, which represent the Norwegian implementation of PEPPOL BIS Billing 3.0.
Note: In SEMINE, all PEPPOL-compliant UBL invoices and credit notes are supported, including but not limited to the Norwegian EHF format.
Minimal valid UBL invoice example
Below is the simplest UBL invoice that will be accepted by our system.
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<ID>INV-2024-001</ID>
<IssueDate>2024-03-15</IssueDate>
<InvoiceTypeCode>380</InvoiceTypeCode>
<DocumentCurrencyCode>NOK</DocumentCurrencyCode>
<AccountingSupplierParty>
<Party>
<PartyName>
<Name>Supplier Company AS</Name>
</PartyName>
<PartyTaxScheme>
<CompanyID>123456789</CompanyID>
<TaxScheme>
<ID>VAT</ID>
</TaxScheme>
</PartyTaxScheme>
</Party>
</AccountingSupplierParty>
<AccountingCustomerParty>
<Party>
<PartyName>
<Name>Customer Company AS</Name>
</PartyName>
<PartyTaxScheme>
<CompanyID>987654321</CompanyID>
<TaxScheme>
<ID>VAT</ID>
</TaxScheme>
</PartyTaxScheme>
</Party>
</AccountingCustomerParty>
<InvoiceLine>
<ID>1</ID>
<InvoicedQuantity unitCode="EA">1.0</InvoicedQuantity>
<LineExtensionAmount currencyID="NOK">1000.00</LineExtensionAmount>
<Item>
<Name>Consulting Services</Name>
</Item>
<Price>
<PriceAmount currencyID="NOK">1000.00</PriceAmount>
</Price>
</InvoiceLine>
<LegalMonetaryTotal>
<TaxExclusiveAmount currencyID="NOK">1000.00</TaxExclusiveAmount>
<TaxInclusiveAmount currencyID="NOK">1250.00</TaxInclusiveAmount>
<PayableAmount currencyID="NOK">1250.00</PayableAmount>
</LegalMonetaryTotal>
</Invoice>
Field requirements and structure
Document header fields
| Field | Required | Format / Values | Purpose | Example |
|---|---|---|---|---|
| ID | Yes | Any unique string | Invoice number — must be unique | INV-2024-001 |
| IssueDate | Yes | YYYY-MM-DD | Date the invoice was created | 2024-03-15 |
| InvoiceTypeCode | Yes | 380 (invoice) or 381 (credit note) | Document type | 380 |
| DocumentCurrencyCode | Yes | 3-letter ISO code | Currency used for all amounts | NOK, EUR, USD |
Supplier information (sender)
| Field | Required | Format / Values | Purpose | Example |
|---|---|---|---|---|
| AccountingSupplierParty > Party > PartyName > Name | Yes | Text | Supplier legal name | Supplier Company AS |
| AccountingSupplierParty > Party > PartyTaxScheme > CompanyID | Yes | 8–11 digits, numbers only | Organization / VAT number | 123456789 |
| AccountingSupplierParty > Party > PartyTaxScheme > TaxScheme > ID | Yes | VAT | Tax scheme identifier | VAT |
Warning: The CompanyID must be numeric only (no letters, spaces, or country codes). Examples:
- Correct:
123456789 - Wrong:
NO123456789MVA - Wrong:
SE123456789001
Customer information (receiver)
| Field | Required | Format / Values | Purpose | Example |
|---|---|---|---|---|
| AccountingCustomerParty > Party > PartyName > Name | Yes | Text | Customer legal name | Customer Company AS |
| AccountingCustomerParty > Party > PartyTaxScheme > CompanyID | Yes | 8–11 digits, numbers only | Customer organization / VAT number | 987654321 |
| AccountingCustomerParty > Party > PartyTaxScheme > TaxScheme > ID | Yes | VAT | Tax scheme identifier | VAT |
CompanyID must match the receiving organization in our system. If it does not match, the invoice will be rejected.Invoice lines (at least one required)
| Field | Required | Format / Values | Purpose | Example |
|---|---|---|---|---|
| InvoiceLine > ID | Yes | Any string | Line number or identifier | 1 |
| InvoiceLine > InvoicedQuantity | Yes | Decimal number | Quantity | 1.0 |
| InvoiceLine > InvoicedQuantity @unitCode | Recommended | UN/CEFACT code | Unit of measure | EA, H87 |
| InvoiceLine > LineExtensionAmount | Yes | Decimal number | Line total before VAT | 1000.00 |
| InvoiceLine > Item > Name | Yes | Text | Line description | Consulting Services |
| InvoiceLine > Price > PriceAmount | Yes | Decimal number | Price per unit | 1000.00 |
LineExtensionAmount should equal InvoicedQuantity × PriceAmount.Total amounts
| Field | Required | Format / Values | Purpose | Example |
|---|---|---|---|---|
| LegalMonetaryTotal > TaxExclusiveAmount | Yes | Decimal number | Total of lines before VAT | 1000.00 |
| LegalMonetaryTotal > TaxInclusiveAmount | Recommended | Decimal number | Total including VAT | 1250.00 |
| LegalMonetaryTotal > PayableAmount | Yes | Decimal number | Final amount to be paid | 1250.00 |
All amounts must include the currencyID attribute matching the document currency.
Note:
-
TaxExclusiveAmount = Sum of all
LineExtensionAmountvalues. -
TaxInclusiveAmount =
TaxExclusiveAmount+ VAT. -
PayableAmount = Final amount customer must pay (usually equals
TaxInclusiveAmount).
Common unit codes
| Code | Description | Use for |
|---|---|---|
| EA | Each (piece) | Products, items |
| H87 | Hour | Services, labor |
| DAY | Day | Daily rates |
| MON | Month | Monthly fees |
| KGM | Kilogram | Weight |
| MTR | Meter | Length |
| LTR | Liter | Volume |
Common currency codes
| Code | Currency |
|---|---|
| NOK | Norwegian Krone |
| SEK | Swedish Krona |
| DKK | Danish Krone |
| EUR | Euro |
| USD | US Dollar |
| GBP | British Pound |
Common validation errors
| Error message | What is wrong | How to fix |
|---|---|---|
| Missing invoice number | No ID element |
Add <ID> with a unique invoice number |
| Missing issue date | No IssueDate element |
Add <IssueDate> in YYYY-MM-DD format |
| Invalid currency code | Currency not recognized | Use valid ISO 4217 code (NOK, EUR, USD) |
| Supplier organization number required | Missing or invalid CompanyID
|
Add numeric-only organization number (8–11 digits) |
| Customer organization number required | Missing or invalid CompanyID
|
Add numeric-only organization number (8–11 digits) |
| Invalid organization number format | Contains letters or wrong length | Remove country codes; use only digits |
| No invoice lines found | No InvoiceLine elements |
Add at least one invoice line |
| Missing line amount | No LineExtensionAmount
|
Add line total amount |
| Missing total amount | No PayableAmount
|
Add total payable amount |
Organization number format by country
| Country | Length | Format | Valid example | Invalid example |
|---|---|---|---|---|
| Norway 🇳🇴 | 9 digits | Numeric only | 123456789 | NO123456789MVA |
| Sweden 🇸🇪 | 10 digits | Numeric only | 1234567890 | SE123456789001 |
| Denmark 🇩🇰 | 8 digits | Numeric only | 12345678 | DK12345678 |
| Finland 🇫🇮 | 8 digits | Format: 1234567-8 | 1234567-8 | FI12345678 |
Optional but recommended fields
Payment information
<PaymentMeans>
<PaymentMeansCode>31</PaymentMeansCode>
<PayeeFinancialAccount>
<ID schemeID="BBAN">12345678901</ID>
</PayeeFinancialAccount>
</PaymentMeans>
Due date
<PaymentTerms>
<PaymentDueDate>2024-04-15</PaymentDueDate>
</PaymentTerms>
Tax details
<TaxTotal>
<TaxAmount currencyID="NOK">250.00</TaxAmount>
<TaxSubtotal>
<TaxableAmount currencyID="NOK">1000.00</TaxableAmount>
<TaxAmount currencyID="NOK">250.00</TaxAmount>
<TaxCategory>
<ID>S</ID>
<Percent>25.0</Percent>
<TaxScheme>
<ID>VAT</ID>
</TaxScheme>
</TaxCategory>
</TaxSubtotal>
</TaxTotal>
Purchase order reference
<OrderReference>
<ID>PO-2024-001</ID>
</OrderReference>
Testing checklist
Verify the items below before sending invoices to production.
-
Invoice has a unique
ID -
IssueDateis in YYYY-MM-DD format -
InvoiceTypeCodeis 380 (or 381 for credit notes) -
DocumentCurrencyCodeis a valid 3-letter code -
Supplier
CompanyIDis numeric only (8–11 digits) -
Customer
CompanyIDis numeric only (8–11 digits) -
Customer
CompanyIDmatches the receiving organization -
At least one
InvoiceLineexists -
Each line includes
ID,InvoicedQuantity,LineExtensionAmount,Item.Name, andPrice.PriceAmount -
All amounts include
currencyIDattribute -
TaxExclusiveAmountequals sum of all line amounts -
PayableAmountis the correct total - All amounts use decimal format (e.g., 1000.00)
Need more information?
For detailed technical documentation, see the related documents:
Kommentarer
0 kommentarer
Logg på hvis du vil legge inn en kommentar.