Denár for WooCommerce

By Roman Kraiger | Pixeler s. r. o.

0+ active installationsVersion 0.4.3

Invoices for WooCommerce orders in Denár - proforma with PAY by square for bank transfers, invoice once paid, credit note on refund.

Description

Connects a WooCommerce shop to Denár, invoicing and bank
reconciliation for the Slovak market. The plugin holds no invoicing logic of
its own: numbering, VAT, PDF, PAY by square QR payments and e-invoicing
(Peppol, mandatory in Slovakia from 2027) happen in Denár, the shop only sends
orders and listens to webhooks.

  • Bank transfer: a proforma with PAY by square is issued when the order is placed, with the order number as the variable symbol. Once Denár pairs the payment from the bank, the order moves to Processing and the invoice is issued from the proforma.
  • Card and payment gateways: the invoice is issued and marked paid right away.
  • Cash on delivery: the invoice is issued when the order is completed.
  • Tax point dates: the bank day of a paired payment, the Packeta delivery day for cash on delivery.
  • Your statuses: choose the statuses that issue the invoice (custom ones too), separately for cash on delivery.
  • Refunds: a credit note to the invoice, for the refunded lines or the refunded amount.
  • Cancelled orders: an unpaid proforma is cancelled.
  • Invoice in e-mail: the invoice PDF from Denár goes with the customer e-mails you choose (completed order by default).
  • Coupons become a document discount, shipping and fees are lines; company details (IČO, DIČ, IČ DPH) are read from the common _billing_ic / _billing_dic / _billing_dic_dph fields; EU reverse charge and export from the px-shop-core company module.
  • Every document is checked against the order total – a document whose total differs (rounding of prices with VAT) stays a draft instead of being issued with a wrong amount.
  • The order screen lists the documents with a PDF download; “Send to Denár again” retries after a fix.
  • Runs in the background (Action Scheduler) with retries – the checkout never waits for Denár.
  • Compatible with HPOS and the block checkout.

A Denár account with API access is required – plans Firma and Profi, and the free trial. Sign up at denar.sk.

External services

This plugin connects to the Denár API (https://api.denar.sk/v1, operated by
Pixeler s. r. o., Slovakia), the invoicing service the shop uses to issue its
documents. Without it the plugin does nothing.

  • When the administrator clicks “Check connection”, the plugin sends the API
    key and receives the name and tax identifiers of the connected organization.
  • When an order is to be invoiced, the plugin sends the order data needed on
    an invoice: order number, items, prices, taxes, shipping, payment method and
    the customer’s billing details (name, company, company and VAT
    identification numbers, address, e-mail, phone). The shop’s own data is
    sent under its API key.
  • Denár sends webhooks back to the shop (document paid, cancelled); those
    carry document data, not personal data beyond what the shop sent.

Nothing is sent before the administrator enters an API key.

  • Terms of service: https://denar.sk/obchodne-podmienky
  • Privacy policy: https://denar.sk/ochrana-osobnych-udajov

Only when the shop uses the Packeta plugin and a cash on delivery order is to
be invoiced, the plugin asks the Packeta API (https://www.zasilkovna.cz/api/rest,
operated by Zásilkovna s.r.o., Czech Republic) for the tracking history of the
order’s parcel, to put the day the parcel was taken over on the invoice. It
sends the shop’s Packeta API password and the parcel id stored by the Packeta
plugin – no customer data.

  • Packeta terms: https://www.packeta.com/general-terms-conditions
  • Packeta privacy policy: https://www.packeta.com/privacy-policy

Installation

  1. Install and activate the plugin (WooCommerce must be active).
  2. In Denár create an API key (Account -> API keys) with the scopes
    documents and partners, read and write.
  3. Paste it into WooCommerce -> Settings -> Denár and click Check connection.
  4. In Denár add a webhook (Account -> Webhooks) to the URL shown on the
    settings screen and paste its secret into the plugin.

Credentials may also be defined in wp-config.php: DENAR_WC_API_KEY,
DENAR_WC_WEBHOOK_SECRET, DENAR_WC_API_URL.

FAQ

Does the plugin work without Denár?

No. It is a connector – invoices are issued in Denár.

How do I get a Denár account?

Sign up at denar.sk. New accounts start with a free trial that includes the API; afterwards the plugin needs a plan with API access (Firma or Profi).

My prices include VAT. Will the invoice match the order?

Yes. The plugin sends the prices with VAT and Denár works the base out of them, so the invoice total is the order total to the cent, coupons included.

Where are errors logged?

WooCommerce -> Status -> Logs, source “denar”. The API key is never logged.

Changelog

0.4.3

  • Setting “Sentence about the attached invoice”: a sentence of your own (e.g. “The invoice {number} is attached to this e-mail.”) above the order table of every e-mail that carries the invoice PDF – whichever e-mails are chosen in “Invoice in e-mails”. Only when the PDF is attached and only for customers without a company name, IČO or DIČ. Empty by default.

0.4.2

  • Release for wordpress.org: versions 0.3.0 to 0.4.1 were not published there because of the “Update URI” plugin header. No change in behaviour.

0.4.1

  • Bank transfer paired in Denár: the invoice is issued before the order is marked paid, so the e-mail of the paid order (e.g. “Completed” for downloads) carries its PDF.
  • An order of downloads only is completed after the payment as WooCommerce does it; “Status after payment” applies to orders that need processing.
  • Orders list: column “Invoice” with the number of the invoice from Denár (the proforma while the order waits for payment), linked to the PDF.

0.4.0

  • Delivery date on the invoice is the day VAT became due: the bank day of a proforma payment paired in Denár, for cash on delivery with Packeta the day the parcel was taken over (from Packeta tracking).
  • Setting “Status after payment”: the status an order moves to once Denár pairs its payment (e.g. a custom “Paid”). An order already marked paid by hand keeps its status.

0.3.0

  • Choose the order statuses that issue the invoice, custom statuses included (e.g. “Paid” from a status plugin), with a separate list for cash on delivery – like PDF invoice plugins do.
  • Choose the customer e-mails that carry the invoice PDF (custom status e-mails included); replaces the 0.2.5 checkbox.

0.2.5

  • The completed order e-mail (and the invoice sent from the order screen) carries the invoice PDF from Denár; a cash on delivery invoice is created right then. Setting “Invoice in e-mail”, on by default.

0.2.4

  • Number series are under Company in Denár, not Settings (settings screen hint).

0.2.3

  • API keys and webhooks are under Account in Denár, not Settings (readme and settings screen).

0.2.2

  • Readme: Denár sign-up is open; which plans include the API.

0.2.1

  • Every PHP file refuses direct access.
  • Readme: how to get a Denár account, prices with VAT.

0.2.0

  • Documents for orders: proforma for bank transfers, invoice for paid orders (from the proforma when there is one), invoice on completion for cash on delivery, credit notes for refunds, cancelling unpaid proformas.
  • Order box with the documents and PDF download, order action “Send to Denár again”.
  • Shops with prices including VAT send the prices with VAT (Denár prices_include_vat), so the document total is exactly the order total, coupons included.
  • Totals check – a document that does not match the order stays a draft; a retry updates the draft with the current order.

0.1.2

  • Ready for wordpress.org: separate build without the GitHub updater, External services section in the readme.
  • Plugin name back to “Denár for WooCommerce” (trademark rules); Slovak “Denár pre WooCommerce” comes from the translation.

0.1.1

  • Icon and banner shown in Dashboard -> Updates and in the plugin details.
  • Plugin name in Slovak: Denár pre WooCommerce.
  • Tested up to WordPress 7.1.

0.1.0

  • Plugin skeleton: settings, connection check, webhook endpoint with signature verification, updates from GitHub releases.