generate_fa3_invoice
Generates a KSeF-compliant FA(3) XML invoice from structured invoice data for submission via KSeF API v2.
Instructions
Generate a KSeF-compliant FA(3) XML invoice from structured invoice data.
FA(3) is required for all new invoice submissions via KSeF API v2. Use this tool — not generate_fa2_invoice — before calling submit_invoice_to_ksef.
The seller's tax_id must be a Polish NIP (10 digits). The buyer's tax_id may be a Polish NIP, a EU VAT number (set alt_tax_id), or absent (leave tax_id.identifier empty to emit ).
Returns the FA(3) XML string ready for submit_invoice_to_ksef.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | Country-agnostic invoice document envelope. Country adapters read/write this model via BaseDocumentGenerator.generate() and BaseDocumentParser.to_invoice_document(). document_type: Country-specific code (IT: TD01–TD28, UBL: 380/381/384, DE: RE/GU…). transmission_format: Platform routing hint (IT: FPA12/FPR12, FR: B2B/B2BInt/B2C). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |