Nestero Integration for Fakturownia

Description

Nestero Integration for Fakturownia connects your store to Fakturownia.pl, a Polish invoicing and accounting service. Orders become VAT invoices without anyone retyping them.

The free version includes:

  • connection to your Fakturownia account with an API token (the token is encrypted in the database and saved only after a successful connection test),
  • automatic or manual VAT invoices triggered by the order statuses you choose,
  • three modes: every order / only when the customer asks (checkbox plus every B2B order) / manual only,
  • automation rules: business orders only, private orders only, skip orders worth zero,
  • a tax number (NIP) field with checksum validation in the classic checkout, the block checkout, My Account and the order screen,
  • customer deduplication in Fakturownia (external id / tax number) so you do not end up with two cards for one contractor,
  • WooCommerce to Fakturownia VAT rate mapping per tax class, which tells a 0% rate apart from an exemption, and refuses to guess an unmapped rate,
  • support for stores priced gross and net, plus a document total check after the invoice is issued,
  • invoice delivery by e-mail: through WooCommerce (PDF fetched from the API, your own subject and body) or through Fakturownia,
  • the invoice PDF attached to standard WooCommerce transactional e-mails,
  • three layers of idempotency (lock, queue, oid_unique) so one order never produces two documents,
  • detection of invoices issued outside the plugin, marked with an “external” badge,
  • order screen actions: issue, retry, send e-mail, refresh status, cancel, unlink,
  • retries with backoff (5 minutes up to 24 hours), with validation and authorisation errors handled separately,
  • a dashboard, a filterable document list and logs that mask sensitive data,
  • full HPOS and block checkout compatibility.

The Pro extension (sklep.nestero.pl) adds correction invoices for refunds, including partial and repeated ones, KSeF status synchronisation (webhook and polling, with the customer e-mail held back until the document receives its KSeF number) and bulk operations.

External services

This plugin relies on Fakturownia.pl (https://fakturownia.pl), an external invoicing service. The plugin cannot issue any document without it: every invoice is created in your own Fakturownia account, identified by your account subdomain and API token.

The plugin contacts the API only when there is something to do — when an invoice or a correction is issued, when a contractor is looked up or created, when an invoice PDF is downloaded, when an e-mail is sent through Fakturownia, and once a day for a connection health check.

Data sent: the order’s billing details (first and last name or company name, address, tax number, e-mail address, phone number) together with the order items, quantities, prices and VAT rates. Nothing is sent for orders that are not invoiced.

Endpoint: https://{your-account}.fakturownia.pl/*.json
API documentation: https://github.com/fakturownia/API
Terms of service: https://fakturownia.pl/regulamin
Privacy policy: https://fakturownia.pl/polityka-prywatnosci

FAQ

Does the plugin send invoices to KSeF?

Fakturownia handles the submission to KSeF on its side. Synchronising KSeF statuses back into WooCommerce (webhook, polling, holding the customer e-mail until the document receives its number) is a Pro feature.

Why was no invoice created for an order?

Every skipped order is logged with a reason: manual mode, a zero-value order, a business/private rule, or the customer not asking for an invoice. Check Fakturownia Logs, or open the order — the reason is shown in the metabox as well.

Can I run this plugin next to the native Fakturownia integration?

No. Two integrations issue two documents for the same order, and with KSeF both are sent to the tax authority. The plugin detects documents created outside of it and warns you.

Where is the API token stored?

Encrypted in the database with libsodium (XSalsa20-Poly1305), using a key derived from your site’s AUTH_KEY or from the NESTERO_FAKT_ENCRYPTION_KEY constant if you define one. The token is never printed in full in the admin and is masked in the logs.

Does uninstalling the plugin delete my invoice records?

No, unless you ask for it. The link between an order and its invoice number is often the only place your store remembers what a document was issued for, so it survives uninstalling. You can opt in to removing it in Settings Advanced.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Nestero Integration for Fakturownia” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.6.0

  • The plugin now exposes a documented contract (Nestero\Fakturownia\Api) that an extension can build on: settings, the Fakturownia client, document records and the job queue. Nothing changes for a store running the free plugin on its own.
  • Documents other than the VAT invoice can now go through the same queue, lock and retry schedule. New filters: nestero_fakt_document_payload (payload with the document kind and refund it belongs to), nestero_fakt_document_kind_for_order, nestero_fakt_document_kinds, nestero_fakt_documents_row_actions, plus the action nestero_fakt_order_metabox_actions.
  • Retrying a document from the Documents screen uses one job for every kind. A correction used to have a separate job with different arguments, so it retried on a different path than the invoice next to it.
  • Recovery after a failed request looks the document up by the identifier that was actually sent, not by the order number — so a failed correction can no longer “recover” into the original invoice.

0.5.9

  • Activating the plugin no longer takes over the screen: WordPress stays where it was, and the setup lives under Fakturownia Setup.
  • Plugin warnings appear only on the plugin’s own screens and on orders — nowhere else in the panel.
  • The “Pro” link next to the plugin is a plain link to the plugin’s own Pro tab, without colour or bold.

0.5.8

  • The Pro reminder no longer shows up on the WordPress dashboard. Everything about the Pro extension now lives on the plugin’s own screens.
  • The interface can now be translated: the source strings are English and a Polish translation ships with the plugin.
  • The plugin declares HPOS and block checkout compatibility, so WooCommerce stops reporting it as incompatible with features it actually uses.
  • The duplicate-invoice lock works under HPOS. It used to be stored as post meta, which orders in that mode no longer use.
  • “Cancel invoice” and “Unlink” ask for confirmation again, and cancelling asks for a reason. A class name mismatch meant the confirmation never appeared, leaving a document one click away from being cancelled.
  • Request bodies are no longer logged by default — they carry the customer’s complete billing data. Turn them on while diagnosing a problem in Settings Advanced Detailed logs.
  • An unreadable token (after moving the store or changing the keys in wp-config.php) no longer breaks the order screens; the plugin simply asks you to connect again.
  • Uninstalling keeps invoice links and logs. Removing them is a separate opt-in in Settings Advanced.
  • An order skipped by the automation rules no longer leaves behind a “queued” row that promised an invoice “in a few minutes” forever.
  • After a token is fixed, the invoices it blocked are actually issued — including when the plugin runs in manual mode.
  • The storefront no longer pays three scheduler queries for every visitor page view.
  • Smaller fixes: the temporary PDF lives in an unguessable directory and is cleaned up after sending, the orders list link is correct under HPOS, the setup wizard no longer hijacks bulk plugin activation, and the “sodium” PHP extension is verified on activation.

0.5.7

  • PKWiU lands in the right column of the invoice instead of under the item name. Fakturownia keeps PKWiU and the product code in a single field, so when a product has PKWiU it takes that column and the header names what is in it.

0.5.6

  • PKWiU finally shows up on the invoice, under the item name. The plugin used to send it in a field Fakturownia does not have, so the symbol vanished without any error.

0.5.5

  • Admin messages rewritten without jargon. Instead of “the job will be processed in the background”, the plugin simply says the invoice is being created and will show up in a few minutes.

0.5.4

  • Critical: invoices containing a VAT-exempt item were not issued at all — the API rejected the document with “Invalid attribute”. Fixed.
  • SKU appears on the invoice printout. It used to be stored in Fakturownia while the product code column stayed hidden.
  • “VAT exemption type” became “VAT exemption legal basis” — it is printed on the document, as required by art. 106e(1)(19) of the Polish VAT Act.

0.5.3

  • Important: a 0% rate and an exemption are now told apart. VAT rates are mapped per WooCommerce tax class rather than per percentage — previously every zero-tax item received the same rate on the invoice.
  • Existing per-percentage settings keep working as a fallback. Review Invoicing VAT rate mapping.

0.5.2

  • Shipping and fees are billed as services, not pieces, so they use a service unit on the invoice. The unit can be changed with the nestero_fakt_service_quantity_unit filter.

0.5.1

  • Fix: discounts (coupons, sales) were missing from the invoice. The total was correct, but instead of the list price and the discount the document showed the reduced price straight away.

0.5.0

  • New action layout on the order screen: one primary action, document operations as a consistent list with icons, “Open in Fakturownia” as a link.
  • Irreversible actions (cancelling, unlinking) are muted — red appears only on hover.
  • Disabling the e-mail for a single order looks like a setting now, not like the most important link in the panel.

0.4.9

  • Operation history in plain language: “Invoice issued” instead of invoice_created, “Skipped — the customer did not ask for an invoice” instead of invoice_skipped.
  • The same names in the order history, on the dashboard and in the log, filter included.

0.4.8

  • Fix: re-queueing the same invoice marked the plugin’s own document as issued outside the plugin. The plugin now recognises invoices it created itself.
  • A document that already exists in Fakturownia is not sent back to the queue — the plugin suggests cancelling or unlinking it instead.
  • Plugin warnings appear only on its own screens and next to orders, state how many documents are affected and link straight to the list.

0.4.7

  • “Issue invoice now” answers immediately: the document appears as “Queued” with a note that the job is waiting to be processed. The screen used to look exactly as it did before the click.
  • Messages after an action say what actually happened instead of a generic “Action completed”.

0.4.6

  • Fixed “Issue invoice now” in manual mode — the job reached the queue, re-checked the automation rules there and skipped itself.
  • Fixed order action links under HPOS: they led to a screen that does not exist, so clicking looked like nothing happened. The same applied to order links on the dashboard, in the logs and on the document list.

0.4.5

  • Fixed invoices being skipped for block checkout orders: the tax number and the “I want a VAT invoice” consent were visible on the order, but the plugin did not read them and treated such orders as private ones without consent.
  • Values from both checkouts now land under the same order keys; existing orders repair themselves on their next status change.

0.4.4

  • Invoicing settings no longer look duplicated: “Invoicing mode” and “Automation rules” became one “When to issue an invoice” section with three clearly different questions — automatic issuing, order scope and trigger statuses.
  • Document content fields (sale date, notes) moved into their own section instead of splitting the automation settings.
  • In the wizard, the card title no longer repeats the first field label.
  • Option names unified between the wizard and the settings.

0.4.3

  • Fixed the layout of the second wizard step: the option label blended into its description and the order status list stretched the screen.
  • The selected option is visibly marked and the fields can be operated from the keyboard with a readable focus outline.
  • Order statuses are laid out in columns instead of one long list.

0.4.2

  • New presentation of the Pro information: a dark panel with clear hierarchy instead of yet another white box, in the same form on the dashboard, in the Pro tab and in the dashboard notice.
  • The message states plainly which manual work disappears — today’s way of working struck through, next to the benefit.

0.4.1

  • Pro information at the top of the plugin dashboard, focused on the benefit (“a refund in the store means a ready correction”) rather than on feature names.
  • A Pro reminder on the WordPress dashboard: at most once every 90 days, only for people who manage invoices, and only once the plugin has issued a document. It can be dismissed or switched off for good.

0.4.0

  • Consistent Pro information: a “Pro” tab in the settings, a card on the dashboard and short mentions exactly where a feature is missing (a refund without a correction, bulk operations).
  • The promotion never appears in WordPress notices and disappears completely once Pro is active.
  • “Settings” and “Pro” links next to the plugin on the Plugins screen.

0.3.2

  • Rebuilt order metabox: the document number as the heading with the status next to it, instead of a list of “Number:” and “Status:” labels.
  • Actions in three layers — document (PDF, preview), operations (e-mail, status, mark as paid) and an irreversible zone (cancel, unlink) as discreet links rather than identical buttons.
  • Buttons are laid out in rows instead of one below another, which makes the metabox markedly shorter.
  • Clearer warnings and operation history; one look for statuses in the metabox, on the orders list and in Documents.
  • Added the “Cancelled” status to the orders list and to Documents.

0.3.1

  • Fixed a fatal error on the Invoicing tab (VAT rate auto-detection read WooCommerce tax classes as strings).
  • Fixed e-mail delivery through Fakturownia — the recipient list was sent as an array instead of a comma-separated string, which ended in an HTTP 500.
  • Removed the calculating_strategy field from the document; the API rejected it with an HTTP 500, so gross prices are now enforced by the items themselves.
  • After a server error the plugin checks whether the document was created anyway and links it instead of creating a duplicate.
  • The “Tax number required for business orders” option is now enforced, not just stored.
  • Tax number validation is soft by default — an invalid number warns but does not stop the sale; hard blocking is a separate option.
  • The wizard asks directly about the native Fakturownia integration for WooCommerce, which risks duplicate invoices.
  • The order metabox explains why no invoice was created and warns about a missing VAT rate mapping.
  • New “Mark as paid” action; the status is stored as returned by the API.
  • Connection status in four states (working, wrong credentials, service unavailable, not configured) and token validation before the API is called.
  • The Retry-After header is respected when the API rate-limits the plugin.
  • A “WooCommerce order #number” note on the document, optional customer notes, a choice of sale date, and a sender and Reply-To for e-mails.
  • An item without a SKU no longer receives the product id in the code field.

0.3.0

  • E-mail delivery through WooCommerce (PDF from the API, a template with your own subject and body, placeholders).
  • The invoice PDF in WooCommerce transactional e-mails (Completed, Processing, Invoice).
  • Customer deduplication in Fakturownia (external id / tax number plus buyer override).
  • Automation rules: business only, private only, skip zero-value orders; the reason for skipping is logged.
  • VAT rate mapping with auto-detection of WooCommerce rates; an unmapped rate blocks the document.
  • Gross pricing support plus a document total check against the order total.
  • Actions: cancel invoice (with a reason), unlink the local record, refresh status, disable the e-mail for a single order.
  • Connection: masked token preview, a “Disconnect account” button, saving only after a successful test (with an override), a daily connection check with an alert, and automatic resumption of the queue once the token is fixed.
  • A tax number field in My Account Billing address and on the order screen in the admin.
  • An operation mini-log and a retry counter in the order metabox; throttling for repeated e-mail sends.
  • KSeF synchronisation, webhooks and holding the e-mail until the KSeF number arrives moved to the Pro extension.
  • Removed the ask_then_auto_b2b mode (merged into “only when the customer asks”) and the unused REST controllers.

0.2.0

  • Invoicing modes, the “I want a VAT invoice” checkbox, automatic invoices for business orders, an extended wizard.

0.1.0

  • First development version: plugin skeleton, settings screen, connection to the API.