# 402utils Factur-X Invoice Generator

> 402utils Factur-X Invoice Generator is a paid API for AI agents from 402utils.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-11).

Generates a Factur-X PDF/A-3 invoice with embedded EN 16931 CII XML from structured invoice data, targeting French public administration and B2B e-invoicing mandates.

## Facts

- Endpoint: POST https://402utils.com/v1/facturx-generate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-factur-x-invoice-generator-beb15d65
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5nZQmOx9rn2kFSlCcf7fr

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 402utils-factur-x-invoice-generator-beb15d65 -d '<json body>'
```

Example prompt: Generate a Factur-X EN16931 invoice PDF for my company Acme SAS (SIREN 123456789, VAT FR12123456789) billing client Dupont SAS (SIREN 987654321) for 10 hours of consulting at €150/unit, invoice number INV-2025-042, issued 2025-07-01, due 2025-07-31, services category, EUR, with IBAN FR7630006000011234567890189 and BIC BNPAFRPP.

## When to prefer this

Use this endpoint when you need to programmatically generate a standards-compliant Factur-X PDF/A-3 invoice with embedded CII XML, especially for French B2B or public administration contexts ahead of the 2026-09 mandate. Prefer this over generic PDF generation when EN 16931 profile compliance and embedded structured XML (parseable by accounting systems) are required.

## Known failure modes

- Missing required business terms (invoice number, issue date, seller, buyer, or lines) returns a 422 validation error
- Invalid SIREN or VAT ID format causes rejection
- Unsupported typeCode or profile enum value returns a 400 bad request
- Malformed issue date format (not YYYY-MM-DD) causes a parsing error
- Missing electronicAddress when French PA Flux 2 rules require BT-34/BT-49 may produce a non-conformant document with warnings in the conformity report
- Network timeout or server error returns a 5xx response

## How this service works

Generate a Factur-X invoice (PDF/A-3 + embedded EN 16931 CII XML) from structured data: send { invoice, profile }, get the PDF bytes (or JSON with base64 + conformity report via Accept: application/json). Targets EN 16931 and the French PA « Flux 2 » rules (payment mentions, business process, electronic addresses) ahead of the 2026-09 mandate. Technical artifact, not tax/legal advice; you remain responsible for data accuracy and PA transmission.

## Output

Returns PDF/A-3 binary bytes of the Factur-X invoice, or if Accept: application/json is set, a JSON object containing a base64-encoded PDF string and a conformity report detailing compliance with the selected profile (MINIMUM, BASIC_WL, BASIC, or EN16931) and French PA Flux 2 rules.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "invoice": {
   "type": "object",
   "required": [
    "number",
    "issueDate",
    "seller",
    "buyer",
    "lines"
   ],
   "properties": {
    "buyer": {
     "type": "object",
     "description": "Buyer party (BG-7): name, legalId (SIREN), address, electronicAddress {value,scheme} (BT-49)."
    },
    "lines": {
     "type": "array",
     "items": {
      "type": "object"
     },
     "description": "Invoice lines (BG-25): id, name, quantity, unitCode, unitPrice, vatCategory, vatRate."
    },
    "number": {
     "type": "string",
     "description": "Invoice number (BT-1)."
    },
    "seller": {
     "type": "object",
     "description": "Seller party (BG-4): name, legalId (SIREN), vatId, address, electronicAddress {value,scheme} (BT-34)."
    },
    "payment": {
     "type": "object",
     "description": "Payment (BG-16): meansCode, iban, bic, terms, dueDate."
    },
    "currency": {
     "type": "string",
     "default": "EUR",
     "description": "ISO 4217 (BT-5)."
    },
    "delivery": {
     "type": "object",
     "description": "Delivery info (BG-13): address, date."
    },
    "typeCode": {
     "enum": [
      "380",
      "381",
      "384",
      "389"
     ],
     "type": "string",
     "default": "380"
    },
    "issueDate": {
     "type": "string",
     "description": "Issue date YYYY-MM-DD (BT-2)."
    },
    "buyerReference": {
     "type": "string"
    },
    "frenchMentions": {
     "type": "object",
     "description": "Override the PMT/PMD/AAB payment mentions (defaults applied otherwise)."
    },
    "businessProcess": {
     "type": "string",
     "description": "BT-23 typology (B1/S1/M1/…); derived from operationCategory when omitted."
    },
    "operationCategory": {
     "enum": [
      "goods",
      "services",
      "mixed"
     ],
     "type": "string",
     "description": "Nature of operation (FR mandatory mention #3)."
    },
    "vatOnDebitsOption": {
     "type": "boolean",
     "description": "VAT-on-debits option (FR mandatory mention #4)."
    }
   },
   "description": "EN 16931 invoice data (BT/BG business terms)."
  },
  "profile": {
   "enum": [
    "MINIMUM",
    "BASIC_WL",
    "BASIC",
    "EN16931"
   ],
   "type": "string",
   "default": "EN16931",
   "description": "Target Factur-X profile. EN16931 (default) is the reference B2B profile."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-factur-x-invoice-generator-beb15d65/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
