PHP developer in Aalborg

WordPress for businesses in Aalborg, delivered remotely by one developer.

PHP developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.
  • Local WordPress meetup: WordPress Aalborg

My WordPress.org profile

A PHP application that bills Danish public authorities has to send invoices as structured XML through Nemhandel, the common Danish e-invoicing infrastructure. I am Mariusz Szatkowski, a PHP developer in Gdynia who has built with WordPress since 2006 and works remotely and in writing. For a supplier in Aalborg that invoices a municipality, a region or a state body, the invoicing module has to produce the right document, carry the references the buyer gave, and reach the buyer through the network. The legal decisions stay with you and your accountant.

Utzon Center on the Aalborg waterfront

The west side of the Utzon Center in Aalborg. Photo by Liberaler Humanist, licensed CC BY-SA 3.0, via Wikimedia Commons.

#Which Danish rules govern e-invoices to public authorities?

Three layers apply in December 2026, all published on retsinformation.dk:

ActWhat it covers for a supplier
Order no. 206 of 11 March 2011 on electronic settlement with public authorities, as amended by order no. 1832 of 28 December 2023references on the invoice, electronic delivery, payment delay for faulty invoices
Order no. 354 of 26 March 2010 on information in and transport of OIOUBL electronic invoices, as amended by order no. 1831 of 28 December 2023OIOUBL as the public standard, the document types
Act no. 1764 of 28 December 2023 on common digital infrastructure (the Nemhandel act) and order no. 1811 of 2023 on networks for document exchangeNemhandel and Peppol networks, network choice, logs at service providers

The 2023 amendments took effect on 1 January 2024. Order no. 1832 repealed section 5(3), section 6(1) and section 7 of order no. 206, so the old rule that let an authority force suppliers into its own ordering system is gone, and the old section 6(2) and 6(3) are now section 6(1) and 6(2). Order no. 1831 repealed section 3(1) of order no. 354, which had tied transport to the OIO RASP standard. Transport now follows the Nemhandel act and order no. 1811.

The Nemhandel act defines public bodies broadly: state authorities, municipalities and regions, their organisations and companies, and institutions that get half or more of their running costs from public grants (section 2). Section 5 of the act says these bodies must use the common digital infrastructure for electronic documents and e-commerce wherever the infrastructure supports the use.

#What must the invoice reference?

Order no. 206 splits the duty between buyer and supplier. Under section 3, an authority that places an order or requisition gives at least:

  1. its EAN location number
  2. a reference person or other reference, plus any order or requisition number
  3. its policy on credit periods

Section 4 then binds the supplier. The invoice must reference the EAN location number and the reference from points 1 and 2. The creditor may be only one CVR number. If the invoice covers only part of an order, requisition, invoice or credit note, it must say so.

For a PHP invoicing module this means the order record has to store the EAN location number and the buyer reference from the moment the order arrives, in dedicated fields. An invoice generated weeks later reads those fields back. A partial delivery needs a flag on the invoice that tells the authority the order is not closed.

#How must the invoice arrive?

Section 5(1) of order no. 206 requires invoices to public authorities to be sent so that they arrive electronically, in a format the authority can read and load directly into its invoice handling or finance system. A supplier that cannot send from its own system may fill in an invoice template. Section 5(2) says authorities must be able to receive invoices made under the OIOUBL order.

Section 6 sets the consequence. An authority may delay payment of an invoice that does not meet sections 4 and 5, and has to tell the supplier as soon as possible. Once it receives a compliant invoice, it should try to pay within the credit period originally set in days. For a supplier, a missing EAN number or reference costs time on the receivables side, which is why a hard validation step before sending pays off.

Order no. 354 makes OIOUBL the common public standard for electronic invoices and requires authorities to send and receive OIOUBL from 1 May 2011. Its annex names four document types for billing: invoice, credit note, reminder and business receipt (application response). The OIOUBL site of the Danish Business Authority adds that authorities must support two profiles: Procurement-BilSim, with invoice, credit note, reminder and application response, and NES Profile 5 Basic Billing, with invoice and credit note only. Where both parties support BilSim, BilSim applies. NES Profile 5 is meant for a supplier that cannot receive an application response. The same site states that OIOUBL 2.02 of September 2009 was updated to version 2.1 in May 2022.

#Nemhandel or Peppol: which network?

Order no. 1811 of 2023, in force since 1 January 2024, describes the common digital infrastructure as two networks: Nemhandel and Peppol (section 3). It sets rules for each side:

  • public bodies that use the infrastructure must be connected to all included networks and must treat documents the same way whichever network the sender picks (section 6)
  • in correspondence with a public body, the company has the right to choose the network (section 7)
  • a company that receives documents through the infrastructure must process every technically valid document it gets (section 8)
  • correspondence that refers to earlier communication through the infrastructure stays in the same network, unless the parties agree otherwise (section 9)

Section 12 and 13 put logging duties on service providers, the access providers that carry documents for their customers. Their document log records the document type, network, role, time, success or failure with the error code, a unique document ID, signatures or hashes for integrity, the customer and the endpoint, and is kept for five years in line with the bookkeeping retention rule. A PHP system that sends through such a provider does not run that log itself, but it should store the document ID and the provider’s status response next to the invoice, so a dispute can be matched to the provider’s log.

The Nemhandel act gives the Danish Business Authority (Erhvervsstyrelsen) the running of the Nemhandel register, Nemhandelsregisteret, where receivers are listed (section 3). When I checked on 4 December 2026, the Nemhandel site showed 67,633 registered receivers.

#What changes with Nemhandel BIS 4?

The Danish Business Authority published a strategy for the e-invoice document standard dated 5 March 2026. Its main points:

  • Nemhandel carries 16 OIOUBL documents today, and almost 70,000 companies are registered as receivers of OIOUBL e-invoices
  • the Danish Bookkeeping Act requires digital bookkeeping systems to support e-invoices in both OIOUBL and Peppol format
  • the current Peppol BIS 3 does not support payment automation through NemKonto, which OIOUBL does
  • the release of OIOUBL 3, first published as a release candidate in November 2024, was cancelled
  • OIOUBL 2.1 is kept and maintained until the switch
  • the Authority plans Nemhandel BIS 4, a Danish set of extensions on top of Peppol BIS 4, which Peppol aims to publish by the end of 2026
  • the expected timetable: comments on a release candidate from November 2027 to May 2028, phase-in from May to November 2028, phase-out of OIOUBL 2.1 from November 2028 to May 2029, using the Nemhandel deploy windows of 15 May and 15 November
  • after phase-in, Nemhandel BIS 4 becomes mandatory to support and OIOUBL 2.1 becomes optional, and after phase-out OIOUBL 2.1 support ends

The strategy also notes that the EU ViDA directive makes e-invoices mandatory for cross-border trade within the EU from 1 July 2030, with invoices that follow the European norm EN 16931. The plan covers invoice, credit note and invoice response first. Other OIOUBL documents, such as orders and catalogues, have no date yet.

For a PHP codebase the practical reading is that two output formats will coexist for at least two more years. Code that builds the invoice from one internal model and serialises it per format turns the later switch to Nemhandel BIS 4 into one more serialiser.

#What does Peppol BIS Billing 3.0 require?

The Danish Business Authority guidance on CIUS, dated 19 March 2019, explains how Peppol BIS Billing 3.0 applies to Danish buyers. The order it rested on, order no. 346 of 2019, was repealed from 1 January 2024 by order no. 1643, so the guidance serves here as technical background only. Points that still drive the code:

  • the CustomizationID is urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 and the ProfileID is urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
  • Peppol BIS Billing accepts only invoice and credit note types that are processed as a commercial invoice (380) or a credit note (381), so OIOUBL types such as proforma, self-billed (389) and delcredere (390) invoices are not supported there
  • a factored invoice (393) is allowed, with a note that it is factored, the factoring party as payee and payment details pointing to it
  • to correct an invoice to a Danish authority, the guidance recommends a credit note that references the original invoice and cancels the full amount, followed by a new correct invoice
  • the Danish CIUS has no separate validation rules, because the Danish rules are built into the Peppol BIS Billing validation

The Peppol specification also says an invoice must carry a buyer reference or a purchase order reference. That lines up with section 4 of order no. 206.

#How does this look in PHP?

PHP ships XMLWriter and DOM in its standard XML extensions. A minimal start of a Peppol BIS invoice, with the namespaces and identifiers from the OpenPeppol example file:

<?php
$ns = [
    '' => 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2',
    'cac' => 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',
    'cbc' => 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',
];

$w = new XMLWriter();
$w->openMemory();
$w->startDocument('1.0', 'UTF-8');
$w->startElementNs(null, 'Invoice', $ns['']);
$w->writeAttributeNs('xmlns', 'cac', null, $ns['cac']);
$w->writeAttributeNs('xmlns', 'cbc', null, $ns['cbc']);
$w->writeElementNs('cbc', 'CustomizationID', null,
    'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0');
$w->writeElementNs('cbc', 'ProfileID', null, 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0');
$w->writeElementNs('cbc', 'ID', null, $invoice->number);
$w->writeElementNs('cbc', 'IssueDate', null, $invoice->issueDate->format('Y-m-d'));
$w->writeElementNs('cbc', 'InvoiceTypeCode', null, '380');
$w->writeElementNs('cbc', 'BuyerReference', null, $order->buyerReference);
// parties, tax totals and lines follow
$w->endElement();
$xml = $w->outputMemory();

Before sending, the module checks the XML against the schema:

<?php
libxml_use_internal_errors(true);
$doc = new DOMDocument();
$doc->loadXML($xml);
if (!$doc->schemaValidate($xsdPath)) {
    foreach (libxml_get_errors() as $error) {
        $log->warning(trim($error->message), ['line' => $error->line]);
    }
    libxml_clear_errors();
    throw new InvoiceRejected('Schema validation failed');
}

The PHP manual states that DOMDocument::schemaValidate supports XML Schema 1.0 only. That covers structure. The Peppol and OIOUBL business rules come as schematron files, so they run as a second step, either in a validator outside PHP or through the validation your access provider offers before transmission. NemHandel also offers an OIOUBL validation tool on its OIOUBL pages. The second step should match what your provider supports, and a set of test invoices that fail on purpose makes a rule change show up in the test suite.

#What should the invoicing module store?

These fields and records follow from the orders above:

  • the authority EAN location number and buyer reference per order, captured at order time
  • the order or requisition number, when the authority gave one
  • the CVR number of the single creditor
  • a partial-invoice flag and the link to the order it belongs to
  • the document format sent (OIOUBL 2.1 or Peppol BIS 3), so a later switch to Nemhandel BIS 4 can be traced per invoice
  • the document ID and status returned by the access provider, plus any application response or rejection
  • for corrections, the credit note that references the original invoice

#Checklist for an Aalborg supplier

  • Store EAN location number and buyer reference on every public-sector order.
  • Allow only one CVR number as creditor on an invoice.
  • Mark partial invoices clearly.
  • Pick an access provider for Nemhandel or Peppol and record which network each customer uses.
  • Validate against the schema in PHP and against the business rules before sending.
  • Keep provider document IDs and responses with the invoice.
  • Model the invoice once and serialise per format, with Nemhandel BIS 4 in mind for 2028.
  • Watch the Nemhandel release notes before the 15 May and 15 November windows.

#How does a project run?

  1. You send me the current invoicing code or system, the public customers you bill, your access provider if you have one, and your deadline. My answer reaches your inbox within 24 hours on working days.
  2. I write down the scope, the assumptions and questions about formats, references and test data.
  3. I build on a staging copy and send test invoices to the provider’s test endpoint where it has one.
  4. You accept in writing, and the change goes live.

I need repository or server access and sample orders from public customers. An overview of my PHP work is on the PHP developer page. I am not a lawyer or an accountant, so your adviser decides which rules apply to your business.

#Send me your invoicing setup

If your Aalborg company bills public customers from a PHP system, use the contact form to send the system name, the public customers, your access provider and the date you need it by. I write the first estimate for the e-invoicing work free of charge, and the reply comes by email.

See also in Denmark

Need this service: PHP developer in Aalborg?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Latest PHP developer articles

Dec 2, 2026

Laravel Rust: what does it mean for PHP apps?

On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.

Explore other WordPress services and knowledge base