Send and receive via SFTP
This guide describes how to exchange invoices and credit notes with xTool via SFTP: set up access, name and upload files, read response XML, and receive inbound documents.
For CSV import via SFTP, see CSV import via SFTP and Import documents.
What SFTP is
xTool provides an SFTP server for your organisation. After you enable access in the web app, xTool shows Host, Port, and Username — you choose a password (or use a private key). Your ERP or integration client connects to this server and places files in the upload folder; xTool processes them and writes status XML to response folders.
Supported file types are the same as for web upload: XML and PDF invoices and credit notes in supported formats, and xTool CSV for import.
Test environment
For development and testing use the test system: https://xtool-test.invoice-portal.de/.
Set up access
- Sign in to the xTool web app and select your organisation.
- Open Interfaces → SFTP Configuration (requires permission to manage integrations).
- Enter and confirm a password, then click Set Up SFTP.
- Wait until access is ready (this can take up to 2 minutes). When active, the status turns green and connection details (Host, Port, Username) are shown.
Password shown once
The password is displayed only at creation time. Store it securely. If you lose it, set a new password in Change Password.
Alternative: connecting with a private key is also supported instead of password authentication.
Actions on the SFTP page:
| Action | Purpose |
|---|---|
| Test Connection | Verify that SFTP login works and list files in the upload folder. |
| Upload Files | Process files in the upload folder immediately (without waiting for the next scheduled run). |
| Change Password | Set a new password. |
| Lock / Unlock | Temporarily disable or re-enable SFTP access. |
| Delete | Remove SFTP access completely. |
See Organisation and users for permissions.
File name rules
File names must not contain spaces, umlauts, or other special characters.
Allowed characters: a-z, A-Z, 0-9, ., _, -
Allowed extensions for invoice files: .xml, .pdf
Examples — correct:
INV2020_158.xmlINV2020_212.pdf
Examples — incorrect:
| File name | Reason |
|---|---|
invoice 20200401-002.xml |
Space |
Rechnung_zubehör.xml |
Umlaut |
Rechnung.txt |
Wrong extension |
Use the + character as a separator when you need routing or conversion instructions in the file name (see below).
Complete invoice files
Send via Peppol — IDs in the XML
If sender and receiver Peppol Participant IDs are included in the invoice XML:
Send via Peppol — IDs in the file name
If you cannot set Peppol IDs in the file content, pass them in the file name:
Each Peppol ID consists of Electronic Address Scheme (EAS) and ID, separated by a dot.
| EAS | Meaning |
|---|---|
0088 |
EAN Location Code (GLN) |
0204 |
German Leitweg ID |
9918 |
S.W.I.F.T (IBAN) |
9930 |
German VAT ID |
Full EAS list: PEPPOL EAS codelist
Examples:
9930.DE279247134— German VAT ID0204.16067088— German Leitweg ID0088.5790000123456— GLN
Example file name:
Send via email
To send by email instead of Peppol, use:
Example:
Convert before sending
Add a format code to request conversion before validation and sending:
| Format code | Target format |
|---|---|
fa3 |
KSeF FA Invoice 3.0 (XML) |
xrech_ubl |
XRechnung Invoice 3.0 (UBL) |
xrech_cii |
XRechnung Invoice 3.0 (CII) |
peppol_ubl |
PEPPOL BIS Billing 3.0 (UBL) |
peppol_cii |
PEPPOL BIS Billing 3.0 (CII) |
zugferd_en |
Zugferd EN 16931 |
zugferd_de |
Zugferd XRechnung |
Examples: 68451+fa3.xml, 68451+xrech_ubl.xml
Ambiguous routing
Do not combine Peppol Participant IDs and an email receiver in the same file name. The file will be rejected.
Files with attachments
If you need XRechnung or Peppol BIS invoices with embedded attachments, use this naming convention:
Invoice file:
Attachment files:
Allowed attachment extensions: jpg, jpeg, png, pdf, xlsx, ods
For Peppol routing via file name, use +source+ before the IDs:
For email routing:
Folder structure
When SFTP access is enabled, you get the following folder structure. You can add or delete files in these folders, but you cannot delete folders.
| Folder | Purpose |
|---|---|
/upload |
Place outgoing files here |
/upload_response/<invoice_number>/ |
XML responses per processing step |
/rejected |
Files that failed basic checks (+ *_error.txt reason file) |
/download |
Incoming invoices (if registered as a receiver) |
/download_status |
Status XML for incoming invoices |
You can upload multiple files at once, including ZIP archives or folders. ZIP archives are unpacked; all files from subfolders (at any nesting level) are moved into upload and checked. Uploaded archives and empty folders are removed.
Outgoing invoices
Upload folder
To send an invoice via SFTP:
- Upload a valid invoice file with a correct name to
upload. - xTool registers the file and processes it (validate, optionally convert, send via Peppol or email).
- The file is removed from
uploadafter processing. You can view the document in the portal.
Example file names:
INV2020_158.xmlINV2020_212.pdfinvoice+9930.DE279247134+9930.DE123456789.xmlinvoice+receiver@webware24.de.xml68451+fa3.xml
Upload response folder
For each uploaded file, one or more response XML files are written to upload_response/<invoice_number>/ — one per processing step (for example validation, conversion, sending).
Response files are named:
Examples:
FA3_1713000000.xml(Validation Accepted)Inv-20200821-01/FA3_1713000001.xml(KSeF Accepted)
If validation or conversion fails, a response with status Validation Rejected or Conversion Rejected and an <Errors> block is created in the same subfolder.
Rejected folder
Files that fail basic checks before processing (unsupported extension, empty file, invalid characters in the name, unknown format code) are moved to rejected. For each such file, a text file with the reason is created:
Example:
INV2020_144.xmlINV2020_144_1592399949_error.txt
Incoming invoices
If your organisation is registered as a Peppol receiver, incoming invoices can be delivered to the download folder according to your Inbound File Delivery settings on the SFTP page.
Delivery mode
| Mode | Behaviour |
|---|---|
| Disabled | No notification for received invoices |
| Original File | Copy the original received file to download |
| ZIP Archive | Save each received invoice as a ZIP archive in download |
| Separate Folder | Save each received invoice in its own subfolder under download |
Delivery content
You can choose what to deliver:
- Original File — the received XML (or source file)
- PDF Visualization — PDF rendering of the invoice
- Attachments — decoded attachments from XML or extracted from ZUGFeRD PDF
Delivered files are named after the document number, for example:
Download status folder
For every received invoice, a status file is created in download_status:
Example: 68451_1713000000.xml
See Receive via Peppol.
Response files
Each response XML contains a <Status> element describing the result of one processing step.
Possible status values:
- Validation Accepted / Validation Rejected
- Conversion Accepted / Conversion Rejected
- Upload Rejected
- Peppol Accepted / Peppol Rejected
- Email Accepted
- KSeF Accepted / KSeF Rejected
When a step fails, the response includes an <Errors> block with one or more error elements.
Outgoing — validation accepted
Outgoing — validation rejected
On validation errors, <Sender> and <Receiver> are set to 0088:0000000000000.
Outgoing — Peppol accepted
Incoming — download status
KSeF conversion chain (example)
When you upload a Peppol BIS 3 invoice with +fa3 in the file name (for example 603275+fa3.xml), xTool validates, converts to KSeF FA (3), and submits to KSeF. Response files for each step are written to upload_response/<invoice_number>/. On success, the KSeF reference number is included:
After successful KSeF submission, the converted FA (3) document is saved in the same subfolder, for example FA3_1743429240.xml.
See Status lifecycle.
CSV import via SFTP
Place .csv files in the upload folder. Each file must contain one invoice or credit note in xTool CSV v1.0 format. xTool uses the same importer as the web and API.
Filenames can include + routing (same pattern as for XML). See Import documents — SFTP for CSV-specific rules and CSV import format for column specification.
Next steps
- Import CSV — Import documents
- Supported formats — Formats
- Send via Peppol — Send via Peppol
- Send by email — Send by email
- Receive via Peppol — Receive via Peppol
- Help — Support