Skip to content

eleata/peppol-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@eleata/peppol

Node SDK for the eleata Peppol API. Validate EU invoices (Peppol BIS 3, XRechnung, Factur-X, UBL) in 5 lines.

npm License: MIT

Install

npm install @eleata/peppol

Usage

import { Eleata } from "@eleata/peppol";
import fs from "node:fs";

const client = new Eleata({ apiKey: process.env.ELEATA_KEY! });

const result = await client.validate({
  format: "xrechnung-2.x",
  xml: fs.readFileSync("./invoice.xml"),
});

if (!result.valid) {
  console.error("Invalid:", result.errors);
  process.exit(1);
}
console.log(`✓ Valid (${result.duration_ms}ms) — ${result.report_url}`);

Defaults

  • Timeout: 15 seconds
  • Retries: 3 with exponential backoff (200ms, 800ms, 3.2s)
  • Max payload: 5 MB (rejected client-side before sending)
  • Base URL: https://api.eleata.io

Override:

const client = new Eleata({
  apiKey: "...",
  timeout: 30_000,
  maxRetries: 5,
  baseUrl: "https://api.eleata.io",
});

Batch validation

const job = await client.validateBatch({
  format: "peppol-bis-3",
  files: invoices.map((xml) => ({ id: xml.id, xml: xml.bytes })),
  webhookUrl: "https://yourapp.com/webhooks/eleata",
});

console.log("Job started:", job.job_id);
// Webhook will POST to webhookUrl when done

Pricing

Free tier: 100 validations/month. Paid plans from €29/mo. See peppol.eleata.io/pricing.

License

MIT

About

Node SDK for the eleata Peppol API — validate EU invoices in 5 lines.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors