Getting Started
Everything you need to send your first Peppol invoice. TypeScript-native, zero XML, full EU compliance.
Installation
Install the SDK with your preferred package manager.
The package includes full TypeScript definitions — no @types needed.
getpeppr is TypeScript-first. You get full autocomplete,
type checking, and inline documentation out of the box.
npm install @getpeppr/sdkQuick Start
Send your first Peppol invoice in 5 lines of code.
Initialize the client, define your invoice as JSON, and call send().
We handle the UBL XML, BIS 3.0 validation, and Peppol network delivery.
Use
sk_sandbox_... API keys to send invoices in sandbox mode.
No real documents are transmitted to the Peppol network.
import { Peppol } from "@getpeppr/sdk";
const peppol = new Peppol({ apiKey: "sk_sandbox_..." });
const invoice = await peppol.invoices.send({
number: "INV-2026-001",
from: { name: "Acme BVBA", peppolId: "0208:BE0456789012", country: "BE" },
to: { name: "Globex NV", peppolId: "0208:BE0987654321", street: "Rue de la Loi 200", city: "Brussels", postalCode: "1000", country: "BE" },
lines: [{ description: "Consulting", quantity: 1, unitPrice: 1000, vatRate: 21 }],
});
console.log(invoice.status); // "submitted"Configuration
The SDK supports two environments: sandbox (default) for testing and
production for live Peppol delivery. Switch between them with
the environment option.
Options
apiKey— your API key (sk_sandbox_...orsk_live_...)environment—"sandbox"(default) or"production"timeout— request timeout in milliseconds (default: 30000)baseUrl— custom API endpoint override
Never expose your
sk_live_... key in client-side code.
Use environment variables and keep API calls server-side.
import { Peppol } from "@getpeppr/sdk";
// Sandbox (default) — no real invoices sent
const sandbox = new Peppol({
apiKey: "sk_sandbox_...",
});
// Production — live Peppol network
const live = new Peppol({
apiKey: "sk_live_...",
environment: "production",
});
// Advanced options
const custom = new Peppol({
apiKey: "sk_live_...",
environment: "production",
timeout: 60_000, // 60s (default: 30s)
baseUrl: "https://...", // custom endpoint
});