Free plan

Validate e-invoice

Check that an electronic invoice follows the official rules
POST
/v1/documents/einvoice-validate

About this tool

This tool checks an electronic invoice against the European rules for invoices. It looks for missing required fields, wrong codes, sums that do not add up, and tax mistakes. It can also check bank account and VAT number shapes, and the extra Peppol or XRechnung rules. It reports problems but does not fix them.
For example, before you send an invoice to a government customer, you check that it will not be rejected.

How to use it

  1. Choose this tool.
  2. Add the e-invoice file (XML or PDF with the data attached).
  3. Choose which set of rules to check against.
  4. Press Generate.
  5. Read the list of errors and warnings.

What you get back

You get a report that says whether the invoice is valid, with a list of every error and warning to fix.
GOOD TO KNOW
A rule check written for this server, not the official XSD and Schematron files; the answer says so. The file is read, never run. Counts as one document.
TEST IT LIVE

Try Validate e-invoice in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/einvoice-validate
Tool ID
documents.einvoice-validate
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/documents/einvoice-validate" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'attachment=factur-x.xml' \
  -F 'rules=en16931' \
  -F 'tolerance=0'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.einvoiceValidate({
    "file": 'document.pdf',
    "attachment": "factur-x.xml",
    "rules": "en16931",
    "tolerance": 0
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->einvoiceValidate([
    'file' => 'document.pdf',
    'attachment' => 'factur-x.xml',
    'rules' => 'en16931',
    'tolerance' => 0,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Check an e-invoice (UBL, CII, Factur-X, ZUGFeRD, XRechnung; XML or PDF) against the business rules of EN 16931: mandatory fields, code lists, line and total arithmetic, VAT groups and exemption reasons, with the Peppol or XRechnung rules on request.

Validate e-invoice works from text and settings, so no file is needed. Every input is optional.

Validate e-invoice is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/documents/einvoice-validate with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.