---
title: "Create a valid EU e-invoice (UBL 2.1) from simple JSON"
method: POST
path: "/einvoice/create"
tags: ["E-invoice"]
---

# Create a valid EU e-invoice (UBL 2.1) from simple JSON

`POST /einvoice/create`

## Request

- Base URL: `https://api.wsystem.dev`
- URL: `https://api.wsystem.dev/einvoice/create`
- Auth: none declared

Turns JSON (seller, buyer, lines with VAT category/rate, payment) into a UBL 2.1 invoice or credit note in format en16931 (plain EN 16931), xrechnung (German XRechnung 3.0) or peppol-bis3 (Peppol BIS Billing 3.0 structure; Peppol-specific rules not checked yet). Totals and the VAT breakdown are computed for you; the result is validated before it is returned (valid, errors, xml). Optional: tax_point_date (BT-7), party company_id + company_id_scheme (BT-30/BT-47), seller legal_form (BT-33). Example body: GET /einvoice/sample. Free tier shared, then x402 $0.08.

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `402`: Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input.
- `422`: Validation Error
- `429`: Free tier used up and x402 disabled

---

[API](https://skmtc.dev/wsystem/apis/w-system-eu-business-data-api-vat-vies-eori-company-registry.md) · [All operations](https://skmtc.dev/wsystem/apis/w-system-eu-business-data-api-vat-vies-eori-company-registry/llms.txt) · [OpenAPI document](https://skmtc.dev/wsystem/apis/w-system-eu-business-data-api-vat-vies-eori-company-registry/revisions/ab39146b346f?raw)
