Formats
EHF Billing 3.0
EHF (Elektronisk Handelsformat) is the Norwegian format for electronic invoicing, maintained by the Norwegian Digitalisation Agency (Digdir).
EHF Billing 3.0 is a national extension of the Peppol BIS Billing 3.0: every EHF document is also a valid Peppol BIS Billing 3.0 document, with some additional Norwegian rules on top. Take a look here to get information on the Norwegian rules.
Check out the official documentation to get more information about the structure
- Invoice https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/tree/
- CreditNote https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/tree/
To send a document, you can choose to build a standard XML UBL 2.1 document or a JSON payload.
XML UBL 2.1
In this case you must send the HTTP header Content-Type: application/xml and the request body must contains the raw XML.
UBL (Universal Business Language) OASIS (ISO/IEC 19845) is an International Standard. UBL defines a royalty-free library of standard electronic XML business documents such as purchase orders and invoices.
JSON UBL 2.1
In case you do not want to manage the XML format, you can send documents in JSON. In this case you must send the HTTP header Content-Type: application/json.
The structure and the naming are the same of the official XML, except for the case of XML attributes which is a concept that is not applicable to JSON documents
A-Cube have chosen to manage XML attributes within object structures in JSON, so to specify the node value there is a naming convention, the key is __value.
In example, if you have this XML tag with an attribute
<cbc:PayableAmount currencyID="NOK">100.00</cbc:PayableAmount>
The JSON translation is
"PayableAmount": {
"__value": 100.0,
"currencyID": "NOK"
}
Example
EHF invoice examples in different formats:
- XML
- JSON
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0#conformant#urn:fdc:anskaffelser.no:2019:ehf:forward-billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:anskaffelser.no:2019:ehf:postaward:g3:08:1.0</cbc:ProfileID>
<cbc:ID>0997462625</cbc:ID>
<cbc:IssueDate>2019-04-01</cbc:IssueDate>
<cbc:DueDate>2019-05-12</cbc:DueDate>
<cbc:InvoiceTypeCode>82</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>NOK</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>NA</cbc:BuyerReference>
<cac:AdditionalDocumentReference>
<cbc:ID schemeID="AVE">008003762</cbc:ID>
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
</cac:AdditionalDocumentReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0192">811143758</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID schemeID="0192">811143758</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>Havblikk Nett AS</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Storoveien 4</cbc:StreetName>
<cbc:CityName>Oslo</cbc:CityName>
<cbc:PostalZone>0542</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>NO811143758MVA</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyTaxScheme>
<cbc:CompanyID>Foretaksregisteret</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>TAX</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Havblikk Nett AS</cbc:RegistrationName>
<cbc:CompanyID>811143758</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0192">987654325</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>hn0073648</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>Buyer AS</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Storoveien 4</cbc:StreetName>
<cbc:CityName>Oslo</cbc:CityName>
<cbc:PostalZone>0542</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Buyer AS</cbc:RegistrationName>
<cbc:CompanyID schemeID="0192">877734641</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>0003434323213231</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>NO9386011117947</cbc:ID>
<cac:FinancialInstitutionBranch>
<cbc:ID>DNBANOKK</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="NOK">308.63</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="NOK">1234.71</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="NOK">308.63</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="NOK">1234.71</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="NOK">1234.71</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="NOK">1543.34</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="NOK">1543.34</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="DAY">61</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="NOK">171.13</cbc:LineExtensionAmount>
<cac:InvoicePeriod>
<cbc:StartDate>2019-05-01</cbc:StartDate>
<cbc:EndDate>2019-07-01</cbc:EndDate>
</cac:InvoicePeriod>
<cac:Item>
<cbc:Name>Fastbeløp, nettleie</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="NOK">1024</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="DAY">365</cbc:BaseQuantity>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="KWH">2561.00</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="NOK">1063.58</cbc:LineExtensionAmount>
<cac:InvoicePeriod>
<cbc:StartDate>2019-03-01</cbc:StartDate>
<cbc:EndDate>2019-05-01</cbc:EndDate>
</cac:InvoicePeriod>
<cac:Item>
<cbc:Name>Energiledd, nettleie</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="NOK">0.4153</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>
{
"CustomizationID": {
"__value": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0#conformant#urn:fdc:anskaffelser.no:2019:ehf:forward-billing:3.0"
},
"ProfileID": {
"__value": "urn:fdc:anskaffelser.no:2019:ehf:postaward:g3:08:1.0"
},
"ID": {
"__value": "0997462627"
},
"IssueDate": "2019-04-03",
"DueDate": "2019-05-12",
"InvoiceTypeCode": {
"__value": "82"
},
"DocumentCurrencyCode": {
"__value": "NOK"
},
"BuyerReference": {
"__value": "NA"
},
"AccountingSupplierParty": {
"Party": {
"EndpointID": {
"__value": "811143758",
"schemeID": "0192"
},
"PartyIdentification": [
{
"ID": {
"__value": "811143758",
"schemeID": "0192"
}
}
],
"PartyName": [
{
"Name": {
"__value": "Havblikk Nett AS"
}
}
],
"PostalAddress": {
"StreetName": {
"__value": "Storoveien 4"
},
"CityName": {
"__value": "Oslo"
},
"PostalZone": {
"__value": "0542"
},
"Country": {
"IdentificationCode": {
"__value": "NO"
}
}
},
"PartyTaxScheme": [
{
"CompanyID": {
"__value": "NO811143758MVA"
},
"TaxScheme": {
"ID": {
"__value": "VAT"
}
}
}
],
"PartyLegalEntity": [
{
"RegistrationName": {
"__value": "Havblikk Nett AS"
},
"CompanyID": {
"__value": "811143758"
}
}
]
}
},
"AccountingCustomerParty": {
"Party": {
"EndpointID": {
"__value": "987654325",
"schemeID": "0192"
},
"PartyIdentification": [
{
"ID": {
"__value": "hn0073648"
}
}
],
"PartyName": [
{
"Name": {
"__value": "Buyer AS"
}
}
],
"PostalAddress": {
"StreetName": {
"__value": "Storoveien 4"
},
"CityName": {
"__value": "Oslo"
},
"PostalZone": {
"__value": "0542"
},
"Country": {
"IdentificationCode": {
"__value": "NO"
}
}
},
"PartyLegalEntity": [
{
"RegistrationName": {
"__value": "Buyer AS"
},
"CompanyID": {
"__value": "877734641",
"schemeID": "0192"
}
}
]
}
},
"TaxTotal": [
{
"TaxAmount": {
"__value": 308.63,
"currencyID": "NOK"
},
"TaxSubtotal": [
{
"TaxableAmount": {
"__value": 1234.71,
"currencyID": "NOK"
},
"TaxAmount": {
"__value": 308.63,
"currencyID": "NOK"
},
"TaxCategory": {
"ID": {
"__value": "S"
},
"Percent": {
"__value": 25.0
},
"TaxScheme": {
"ID": {
"__value": "VAT"
}
}
}
}
]
}
],
"LegalMonetaryTotal": {
"LineExtensionAmount": {
"__value": 1234.71,
"currencyID": "NOK"
},
"TaxExclusiveAmount": {
"__value": 1234.71,
"currencyID": "NOK"
},
"TaxInclusiveAmount": {
"__value": 1543.34,
"currencyID": "NOK"
},
"PayableAmount": {
"__value": 1543.34,
"currencyID": "NOK"
}
},
"InvoiceLine": [
{
"ID": {
"__value": "1"
},
"Note": [],
"InvoicedQuantity": {
"__value": 1.0,
"unitCode": "C62"
},
"LineExtensionAmount": {
"__value": 1234.71,
"currencyID": "NOK"
},
"Item": {
"Name": {
"__value": "Fastbeløp, nettleie"
},
"ClassifiedTaxCategory": [
{
"ID": {
"__value": "S"
},
"Percent": {
"__value": 25.0
},
"TaxScheme": {
"ID": {
"__value": "VAT"
}
}
}
]
},
"Price": {
"PriceAmount": {
"__value": 1234.71,
"currencyID": "NOK"
}
}
}
]
}