Sending invoices to KSeF
Quanty can issue an invoice to KSeF from a row of a table: "Issue invoices to KSeF from the rows of one table. Each invoice is validated and previewed before anything is sent, and on Production you confirm it by typing its number." One row is one invoice with one line item.
An invoice KSeF accepts on Production is a legal tax document, so sending is built as a ladder of checks, each enforced by the server at the moment it matters. Above all: only a person sends an invoice, from a table row, after checking the preview. Automations, the chat, agents and AI columns never prepare, approve or send anything to KSeF.
An invoice KSeF accepts cannot be withdrawn
"Once KSeF accepts an invoice it cannot be withdrawn or deleted, only corrected with a correcting invoice. Rehearse the whole flow on a Test (sandbox) connection first."
Before you start
- A working KSeF connection (see KSeF e-invoices) on the Gold plan or higher, with a token that has the right to issue invoices. A token that may only read invoices cannot issue one.
- Only an organization admin changes the Sending tab: "Only a workspace admin can change sending settings."
- People who issue invoices need edit access to the table invoices are issued from. Approving a Production invoice, when four-eyes is on, is for admins.
- Invoices from the TMS are issued on the TMS Invoices page instead (see Sending invoices).
Sandbox first
Every screen names the environment it works in:
| Environment | What an accepted invoice means | Badge |
|---|---|---|
| Test (sandbox) | "The KSeF sandbox. Invoices sent here are fictitious and have no legal effect." | Sandbox, no legal effect |
| Demo | "Pre-production KSeF with real-format data. Invoices sent here have no legal effect." | Rehearsal, no legal effect |
| Production | "The real KSeF. Every invoice it accepts is a legal tax document of your company." | Legal effect |
Test and Demo send without any further condition. Production needs two more:
- Quanty has switched production on. Until then the readiness check "Production sending is allowed on this Quanty installation" stays red. Quanty sets this up for your organization; ask us.
- Proof that the flow works. "An invoice was accepted in Test or Demo recently": your organization needs an invoice that KSeF accepted, with its UPO, on a Test or Demo connection within the last 30 days.
So the path is: connect Test (or Demo), set up sending, issue an invoice and wait until KSeF accepts it. Then disconnect, connect Production with a token that may issue invoices, set it up the same way and switch sending on while the proof is fresh.
Set up the Sending tab
The switch
Send invoices from Quanty is off on every new connection. On: "Sending is on. People with edit access to the table can issue invoices from its rows." Switching it off is always possible and takes effect at once.
The table
Table invoices are issued from: "One row is one invoice with one line item. Pick the table your sales are prepared in, or create a new one." A new one is called "Invoices to issue (KSeF)".
Field mapping
"Tell Quanty which column holds each part of the invoice. Required fields must be mapped before an invoice can be prepared." The fields are grouped as Invoice, Buyer, Line item, Declared totals (checked, not sent) and Written back after KSeF answers.
| Field | What it means | Required |
|---|---|---|
| Invoice number, issue date | The number and date printed on the invoice. | Yes |
| Buyer | The buyer's name. The buyer's NIP, EU VAT number, address, postcode and city, and country code are optional. | Yes |
| Item description, VAT rate | The line item and its rate. Unit, quantity and unit net price are optional; an unmapped unit becomes "szt.". | Yes |
| VAT exemption basis | The provision an exempt line relies on. Needed by validation when the VAT rate is zw. | When exempt |
| Currency, payment due, payment form, bank account | Payment details. | No |
| Net, VAT and gross amount | Declared totals: Quanty checks them against the line it computes and never sends them. | No |
| KSeF number, KSeF status | Columns Quanty writes into after KSeF answers. | No |
A field can only point at a column of the chosen table. A Quanty Ghost column shows as "Ghost column, never on an invoice" and cannot be mapped; the check runs again when an invoice is prepared, approved and sent.
Seller details
"Printed on every invoice as the seller. They come from here, never from a table column." Company name, Street and number, Postcode and city and Country code, then Save seller details. The Seller NIP is "Always the NIP of this KSeF connection."
Approval by a second admin (four-eyes)
"Applies to Production only. Test and Demo never need approval."
| Choice | What it does |
|---|---|
| Default: on when the workspace has two or more admins | With one admin: "the default leaves approval off. Invite a second admin to make it possible." |
| Always require a second admin | "a different admin must approve every Production invoice before it is sent." |
| Off | "The person who prepares a Production invoice can also send it." |
Readiness
"Every check must pass before an invoice can be prepared on this connection."
| Check | When it is red |
|---|---|
| Sending is switched on | "An admin switches sending on above." |
| Production sending is allowed on this Quanty installation | Production only; Quanty has not switched it on yet. |
| An invoice was accepted in Test or Demo recently | Production only; no accepted invoice in the last 30 days. |
| The connection works | "Test the connection on the Connection tab, and rotate the token if KSeF refused it." |
| A table is chosen | "Pick the table invoices are issued from." |
| Every required field is mapped | "Map these fields: …" |
| No field reads a Quanty Ghost column | A mapped column is a Ghost column. |
| Seller details are filled in | The seller details are empty. |
"Ready to issue invoices." when all pass.
Issue an invoice
Open the table, right-click a row and choose Issue KSeF invoice, or use the same action in the record window. The action is there only while sending is on and the table is the one invoices are issued from. The dialog has three steps: Validate, Prepare and Send.
- Validate only (dry run). Quanty builds the invoice as KSeF would receive it (the FA(3) format) and checks it: the structure and the arithmetic, the exemption basis of a
zwrate, texts that are too long, unknown currency or country codes, and a foreign-currency invoice with a taxed rate. Nothing is saved or sent. You see a preview with seller, buyer, items and totals, the XML and its SHA-256 fingerprint. - Prepare invoice. "Preparing freezes exactly the XML shown here." If the row changes afterwards, sending refuses and you prepare it again. Preparing the same row again replaces an earlier preparation that was not sent.
- Send. On Test and Demo the button is Send to KSeF. On Production the dialog warns that the invoice will have legal effect, asks you to type the invoice number exactly as shown (with slashes and letter case), and only then enables Send to KSeF Production. What goes out is the prepared XML, checked against the fingerprint you saw.
KSeF usually answers within a minute. You can close the dialog: the status keeps updating on the Submissions tab.
Approval on Production
With four-eyes in effect, a prepared Production invoice waits as Waiting for approval. A different admin opens it on the Submissions tab, checks the preview and clicks Approve, which allows exactly that XML to be sent. The person who prepared it cannot approve it: "You prepared this invoice. A different admin must approve it." It is then sent from the Submissions tab, again with the typed invoice number.
Statuses and the Submissions tab
Submissions lists every invoice prepared or sent from Quanty, newest first; nobody can edit or delete this history. Each one shows who prepared, approved and sent it, and its history records every step with the time and the person. Members see only the invoices of tables they can open.
| Status | Meaning |
|---|---|
| Prepared | The XML is frozen and ready to send. |
| Waiting for approval | A Production invoice waiting for a second admin. |
| Approved | Approved by a second admin, ready to send. |
| Sending | Sent; KSeF has not answered yet. |
| Accepted | KSeF accepted it and gave it a KSeF number. On Production the invoice is issued. |
| Rejected | KSeF did not accept it. Fix the row and issue it again. |
| Failed | The send did not complete (see below). |
| Cancelled | Cancelled before it was accepted. |
You do not need to keep the page open: Quanty checks invoices that are still sending about once a minute, fetches the UPO (KSeF's official receipt) and writes the KSeF number and status into the row if you mapped those columns. Such steps appear in the history as "Quanty (status check)". An accepted invoice offers Download UPO and Download XML.
A prepared, approved or failed invoice can be cancelled by the person who prepared it or by an admin. An accepted invoice cannot be cancelled from Quanty: it can only be corrected with a correcting invoice.
When something goes wrong
| What you see | What to do |
|---|---|
| The row does not validate | The dialog lists the problems. Fix the row and validate again. |
| "The row changed after the preview." | Validate and prepare it again. |
| Rejected as a duplicate (440) | KSeF already holds an invoice with this number from your company. Nothing new was issued. |
| Failed, KSeF asked to try again (550) | Send the same invoice again with Send again. |
| KSeF could not be reached | Nothing was accepted; try again. |
| The send stopped before KSeF gave a reference number | KSeF may still have it. Check the invoice list in KSeF first, tick "I checked KSeF and this invoice is not there", then Send again. |
| No answer within 24 hours | The invoice is marked failed. Check KSeF or run a sales sync; if KSeF never registered it, validate and prepare the row again. |
Duplicates and limits
- An invoice number your company already has accepted in KSeF is refused before anything is sent, whether it went out from Quanty or came in through the sales register. KSeF's own duplicate check is the backstop.
- A number that is being prepared, approved or sent is refused too, and a double click cannot send the same invoice twice.
- An organization sends at most 30 invoices in any 60 minutes, across all environments; past that, the dialog says how many minutes to wait.
Good to know
- Only people send. No automation step, chat tool, agent or AI column can prepare, approve or send an invoice. An automation can only fill in the row of the table; a person issues the invoice.
- The history stays. Every prepared and sent invoice keeps its XML, fingerprint, people and UPO; nobody can edit or delete it.
- Sending off. Switching sending off stops new invoices at once; invoices already sent keep their status updates.
Related pages
- KSeF e-invoices: connecting and receiving.
- Sending invoices: KSeF for invoices issued in the TMS.
- Organizations and roles: who is an admin.