Invoices
The Invoices API lets you read the tax documents your store issued to its customers and re-email them.
Overview
The Invoices API provides endpoints to:
An invoice is a tax document issued for a customer payment. It carries its line items, the bill-to details, totals, and — for Polish KSeF documents — the government delivery status.
Availability
These endpoints are available only for stores that issue invoices through
EasyTools invoicing. A store that uses an external invoicing provider, Stripe
tax, or no invoicing receives a 422 from every Invoices endpoint:
{
"message": "Invoices are only available for stores using Easybilling."
}
KSeF acceptance
A Polish invoice that was issued but not accepted by the government tax system
(KSeF) is still returned, with status error. See
KSeF status below.
Status
Each invoice exposes a derived status:
| Status | Meaning |
|---|---|
issued | Finalized — has a number and an issue date |
pending | Not yet finalized (a Polish KSeF document still being processed) |
error | A Polish KSeF document that was not accepted by the government system |
The list endpoint's status filter accepts these values.
KSeF status
Polish invoices reported to the KSeF system carry a ksef block describing
delivery to the government tax system (it is null for all other invoices).
Its status is one of:
| KSeF status | Meaning |
|---|---|
processing | Submitted, awaiting confirmation |
ok | Accepted by the government system |
send_error | Rejected on submission |
server_error | The government system returned an error |
not_applicable | The document does not require KSeF reporting |
not_connected | The store is not connected to the KSeF system |
blocked | Submission was blocked |
duplicate_error | The document was already submitted |
status_check_error | The delivery status could not be retrieved |
Filter the list to documents in a given KSeF status with gov_status, or to
all failed deliveries with status=error.