PHP developer in Rotterdam

PHP integration for Dutch government e-invoicing: Peppol, Logius and Digipoort, what an invoice for the Rijk must contain, how the city of Rotterdam wants invoices, and UBL validation in PHP.

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 Meetup 010

My WordPress.org profile

#Do Dutch public bodies require e-invoices?

For suppliers to the central government, yes. business.gov.nl says that if you supply goods or services to the Dutch central government you must send an e-invoice. Local and regional authorities, meaning municipalities, provinces and water authorities, may also require one if the procurement terms of your contract say so. The same page adds that other organisations bound by public procurement procedures, such as educational institutions and museums, may require e-invoices, and that these organisations are legally obliged to be able to receive and process them.

Logius puts the supplier side in one sentence: e-invoicing is mandatory for everyone who supplies goods or services to the Rijksoverheid. It also defines the term. An e-invoice is an electronic file that is processed automatically, and an invoice sent by email as a PDF is not an e-invoice. For a PHP shop that exports invoice PDFs from an ERP, that definition is the project.

#Which route does an e-invoice take?

Business.gov.nl lists four ways to send to the central government: accounting software that supports e-invoicing, a link from your accounting package to Peppol through a service provider, a general invoice portal, and the government’s Supplier Portal for occasional invoices. Logius adds the direct line.

RouteWhen it fitsSource statement
Peppol through your software or a service providerDefault choiceThe Rijk has a Peppol connection and prefers to receive invoices that way
Digipoort, directRoughly more than 50 invoices a week, full automation, an ICT setup that can carry itConnection and use are free, own system changes are on your account, and a PKIoverheid certificate is required
Leveranciersportaal RijksoverheidOccasional manual invoicesOpen for e-invoices since 29 August 2022

I read this table as an architecture decision. A supplier with a few invoices a month rarely needs its own access point, and a software house that serves many suppliers might. The Dutch Peppol authority describes three paths for a software vendor: connect through a certified service provider, become a service provider with OpenPeppol membership, or become one and outsource the technical operation. The two service-provider paths require OpenPeppol membership and a contract with the authority, with requirements such as an ISO 27001 certificate and a know-your-customer procedure.

#How does the city of Rotterdam want invoices?

Kop van Zuid, Rotterdam

Photo: GraphyArchy, CC BY-SA 4.0, Wikimedia Commons.

The municipality publishes a step-by-step page for suppliers, Elektronische facturatie. It asks you first to check whether your accounting software can send an e-invoice as UBL or XML. Then it splits by volume. With fewer than 25 invoices a year, some service providers on the Peppol network offer a free invoice portal for manual e-invoices. Twenty-five or more: contact the municipality’s connection team, which it names as the E-facturatie team, about faster options.

For automated suppliers the page gives two possibilities. Sending over Peppol is the preferred one, with the 20-digit Organisatie Identificatie Nummer (OIN) of the municipality as recipient, which the page prints. If your software or provider cannot use Peppol, the second option is to email the XML file together with the matching PDF invoice to a dedicated mailbox. If you build for a Rotterdam supplier, ask the connection team for the current setup instead of copying an identifier from a PDF, and store the OIN as configuration per customer.

#What must an invoice for the Rijk contain?

Logius maintains the Basisfactuur Rijk, and its English guideline is dated December 2022. It says the fields in it are enough for roughly 90 percent of incoming government invoices. The mandatory header data starts with invoice number, invoice date, currency and the order number or reference, and the supplier needs the Chamber of Commerce number and VAT number. Business.gov.nl adds description of goods or services, VAT rate and the OIN as legally relevant content.

The practical limits in the guideline are the ones that bite integrations:

  • The invoice always relates to one purchase order, and the order reference comes from the customer. A reference with a prefix, a space, a point or a wrong order reference can lengthen processing.
  • Up to 9 attachments and 9 MB in total.
  • 100 or more invoice lines, or lines with a zero value, are not recommended because they can cause processing issues.
  • An invoice that misses the minimum requirements is rejected automatically, and an email with the missing fields goes to the address in the supplier section.

The OIN is the identifier that routes the invoice. Logius says to ask your customer which OIN to use, and that OINs can also be looked up in the Peppol Directory. I add a field for it to the customer record and make it mandatory when the customer is a public body.

#Which standards and IDs apply?

The Logius guideline names Peppol BIS 3, NLCIUS and UBL-OHNL as the standards supported by the Dutch government. The Dutch Peppol authority lists what an access point must support: the Peppol AS4 profile at transport level, and Peppol BIS Billing 3.0 and SI-UBL 2.0 at document level. For Dutch recipients it fixes the identifier schemes: NL:KVK with code 0106, NL:VAT with 9944 and NL:OIN with 0190. The OIN is mandatory for the central government, provinces and municipalities; other organisations may use KVK or VAT based IDs.

One piece of older advice is out of date. The website of Stichting Simplerinvoicing says the foundation ceased to exist on 31 December 2020 and redirects to the Dutch Peppol authority. The SI-UBL 2.0 syntax name lives on in the authority’s list of standards, but the old foundation is no longer the place to look. The Peppol authority is part of the Ministry of the Interior and Kingdom Relations, supervises recognised service providers, and states that it offers no commercial services and charges no subscription fees.

#How do I validate UBL in PHP?

Validation has two layers, and PHP handles one of them well. The first is the XML structure. DOMDocument::schemaValidate checks a file against the UBL 2.1 XSD from OASIS; the PHP manual notes that only XML Schema 1.0 is supported. The second is the Peppol business rules, such as arithmetic and code list checks. Peppol publishes them as Schematron in the peppol-bis-invoice-3 repository, including PEPPOL-EN16931-UBL.sch and CEN-EN16931-UBL.sch.

The structural check, plus a guard for the buyer’s endpoint scheme, in about thirty lines:

<?php
declare(strict_types=1);

/** @return list<string> */
function validateUbl(string $xmlPath, string $xsdPath): array
{
    $previous = libxml_use_internal_errors(true);
    $doc = new DOMDocument();
    $errors = [];
    if (!$doc->load($xmlPath) || !$doc->schemaValidate($xsdPath)) {
        foreach (libxml_get_errors() as $e) {
            $errors[] = sprintf('line %d: %s', $e->line, trim($e->message));
        }
    }
    libxml_clear_errors();
    libxml_use_internal_errors($previous);
    return $errors;
}

function buyerEndpointScheme(string $xmlPath): ?string
{
    $xml = simplexml_load_file($xmlPath);
    $xml->registerXPathNamespace('cac', 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2');
    $xml->registerXPathNamespace('cbc', 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2');
    $node = $xml->xpath('//cac:AccountingCustomerParty/cac:Party/cbc:EndpointID/@schemeID');
    return $node ? (string) $node[0] : null;
}

I ran it on PHP 8.4.27 against the OASIS UBL 2.1 XSD and the Peppol base example: the example passes, and after I replaced the issue date with text, it returned the line number and the xs:date error. A government buyer should arrive with scheme 0190, so the caller rejects anything else before the file leaves your system.

The Schematron layer is the limit. The header of PEPPOL-EN16931-UBL.sch declares queryBinding="xslt2". PHP’s XSL extension is built on libxslt, and in my test with libxslt 1.1.35 a stylesheet that used the XPath 2.0 function string-join failed to run. I therefore do not run the Schematron inside the PHP request. In CI and before go-live I use the document validation of the Peppol Test Tool from the Dutch authority, which offers four tests: recipient lookup by KVK, OIN or VAT number, document validation, a send test and an application test for ERP and accounting software. The PHP code stays responsible for correct data going in.

#Will invoices between businesses follow?

The Dutch Peppol authority reported on 17 September 2026 that the cabinet wants e-invoicing between businesses mandatory from 1 July 2030, with digital reporting to the tax authority a year later, and that the bill is expected to reach the Tweede Kamer before summer 2027. A consultation on the draft opened on 18 November 2026. This is a plan, not law. The same news item says the Rijk received almost 2 million e-invoices from suppliers in 2025, 86 percent of all invoices received, about half of them through Peppol. For a PHP system, the useful reading is that a government-ready invoice module is also the first draft of a business-to-business one.

#Checklist for a government-ready invoice module

  • Store the customer’s OIN, order reference and public-body flag on the customer record.
  • Generate UBL with Peppol BIS Billing 3.0 customization and keep the PDF as a convenience attachment, within 9 attachments and 9 MB.
  • Flag at export: 100 or more lines, zero-value lines, order references with spaces, prefixes or points.
  • Validate against the XSD in PHP and against the Schematron in a separate step.
  • Check the buyer endpoint scheme: 0190 for the OIN.
  • Keep the rejection email address monitored: the automatic reply lists the missing fields.
  • Log the invoice, the payload hash and the response, and test a retry.
  • Ask the customer’s connection team for its current route before building.

#How a project with me runs

I am Mariusz Szatkowski, a solo developer from Gdynia, working with WordPress since 2006 and with PHP applications and integrations, remotely and in writing. For an e-invoicing integration the steps are these:

  1. You send the system description, the public customers you invoice, the volume per week and the deadline. An email reply within 24 hours on working days tells you which route I would test first.
  2. I read your customers’ supplier pages and the Logius guideline, and list open questions to each customer in writing.
  3. The scope and assumptions go into a document that you approve.
  4. I build on a staging copy with test invoices, and I design the invoice and settings screens or implement your own layout.
  5. You accept in writing. A maintenance option covers PHP and dependency updates.

What I need from you: read access to the invoicing code, sample invoices, and the contact at the customer’s connection team.

#Send me the invoice flow and the customer list

If you invoice Dutch government bodies from a PHP system, or build software for those who do, send the system description, the customers that require e-invoices, the weekly volume and your deadline through the contact page. You get a free written estimate first, and an email reply within 24 hours on working days. For the general service, see PHP development.

See also in Netherlands

Need this service: PHP developer in Rotterdam?

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