Invoicing Integration for iFirma and WooCommerce

外掛說明

Invoicing Integration for iFirma and WooCommerce connects your WooCommerce store with the iFirma accounting system.

Generate invoices from the order screen, download PDFs, and let customers download documents from My Account. The plugin supports WooCommerce Blocks checkout and HPOS.

Key Features (FREE)

  • Manual Invoice Generation – Create invoices directly from WooCommerce order edit screen
  • Customer Synchronization – Sync customer data with iFirma contractors
  • NIP Field Support – Add NIP number field to checkout (compatible with nip-field-woocommerce plugin)
  • WooCommerce Blocks Support – Compatibility with Gutenberg checkout blocks
  • Advanced VAT Mapping – Map WooCommerce tax classes to iFirma VAT codes/rates (23%, 8%, 5%, zw, 0%)
  • Lump Sum (Ryczałt) Support – Add lump sum tax rate (ryczałt) to invoice positions (global default + per product/variation)
  • Invoice Download – Download PDFs directly from WordPress admin
  • Customer Download – Allow customers to download invoices from My Account View Order
  • Detailed Logging – Track API communications for debugging
  • HPOS Compatible – Full support for WooCommerce High-Performance Order Storage

PRO Features

  • Automatic Invoice Generation – Create invoices automatically on order status change
  • Automatic Proforma Invoices – Issue proformas automatically for selected statuses
  • Rachunki Support – Generate non-VAT documents (rachunki) when applicable
  • Email with PDF Attachments – Send documents to customers as PDF attachments
  • Bulk Operations – Generate documents and download PDFs for multiple orders with progress tracking
  • GTU / PKWiU / Units – Product-level fields + global defaults in settings
  • Global Invoice Notes – Define global invoice notes in settings (supports placeholders)
  • Priority Support – Direct access to our support team
  • Automatic Updates – Get new features and fixes automatically

Get PRO Version

Requirements

  • WordPress 5.8 or higher
  • WooCommerce 5.0 or higher
  • PHP 7.4 or higher
  • Active iFirma account with API access

External services

This plugin connects to two third-party/external services: iFirma API (for invoicing) and NBP API (for exchange rates).

What is iFirma API?

iFirma is a Polish online accounting system that provides invoicing and accounting services for businesses. This plugin uses their official API to:
* Create and manage customers (contractors) in your iFirma account.
* Generate invoices (FREE).
* Generate proformas and rachunki (PRO).
* Download document PDFs.

What data is sent and when?

The plugin sends the following data to iFirma API (https://api.ifirma.pl/) in these situations:

When you click “Create Invoice” (or when automation triggers document generation in PRO version):
* Customer billing information: first name, last name, company name, VAT number (NIP), email, phone number, billing address (street, city, postal code, country).
* Order information: order items (product names, quantities, prices, VAT rates), shipping details, payment method, order date, order total.

When the plugin connects to iFirma API (on settings page load or when needed):
* Your API credentials entered in the plugin settings (for authentication).
* Requests to retrieve data required for issuing documents (e.g. templates/series/settings where applicable).

No data is sent automatically without your action in FREE version. The plugin communicates with iFirma API when:
* You manually create an invoice from the order screen.
* You open the plugin settings page (to test the connection and load configuration).
* You enable automatic document generation in PRO version (if installed).

Service provider information

  • Service name: iFirma API
  • Service URL: https://www.ifirma.pl/
  • API documentation: https://api.ifirma.pl/
  • Terms of Service: https://pomoc.ifirma.pl/pomoc-kategoria/oferta-serwisu-ifirma/regulaminy/
  • Privacy Policy: https://www.ifirma.pl/rodo/polityka-prywatnosci-ifirma-pl/

What is NBP API?

NBP (Narodowy Bank Polski) API is the Polish National Bank’s public API that provides official exchange rates for foreign currencies. This plugin uses it to obtain exchange rates when generating invoices in foreign currencies (e.g. EUR, USD) or when issuing WDT/OSS documents with non-PLN amounts. The rate is needed to convert amounts to PLN for iFirma according to Polish accounting rules.

What data is sent to NBP and when?

When you create an invoice in a foreign currency (or when automation triggers it in PRO):
* The plugin sends a GET request to NBP API with the currency code (e.g. EUR, USD) and the invoice/order date in the URL. No personal data, customer data, or order details are sent.
* Example URL: https://api.nbp.pl/api/exchangerates/rates/A/EUR/2024-01-15/?format=json
* The response (exchange rate) is cached for 24 hours to reduce requests.

No data is sent to NBP without creating a document that requires a foreign currency rate. The request happens only when an invoice (or proforma/rachunek in PRO) is being generated and the order currency is not PLN.

NBP service provider information

  • Service name: NBP API (Narodowy Bank Polski)
  • Service URL: https://api.nbp.pl/
  • API documentation: https://api.nbp.pl/
  • Privacy Policy: https://nbp.pl/o-nbp/kontakt/regulaminy/

By using this plugin, you acknowledge that customer and order data will be transmitted to iFirma for invoice generation purposes, and that currency codes and dates may be sent to NBP API to obtain exchange rates. You are responsible for ensuring compliance with applicable data protection laws (including GDPR) and informing your customers about this data processing.

螢幕擷圖

  • Plugin settings
  • Plugin settings
  • Plugin settings
  • Plugin settings
  • Plugin settings
  • Plugin settings
  • Plugin settings
  • Plugin settings
  • Plugin settings
  • Plugin settings

安裝方式

  1. Upload the plugin files to /wp-content/plugins/invoicing-integration-for-ifirma-and-woocommerce/
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to WooCommerce iFirma
  4. Enter your iFirma API keys and test the connection
  5. Configure VAT mapping and invoice settings

常見問題集

Where do I find my iFirma API keys?

Log in to your iFirma account and generate/copy the keys in: Configuration Extensions and integrations API.

Does this work with WooCommerce Blocks?

Yes, the plugin is compatible with both classic checkout and WooCommerce Blocks checkout.

Can customers download their invoices?

Yes, customers can download invoices from the My Account View Order page after an invoice has been created.

Is this compatible with NIP Field WooCommerce plugin?

Yes. The plugin detects popular NIP field plugin and avoids duplicating the field.

使用者評論

閱讀全部 2 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Invoicing Integration for iFirma and WooCommerce〉的開發相關工作。

參與者

〈Invoicing Integration for iFirma and WooCommerce〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Invoicing Integration for iFirma and WooCommerce〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.16

  • Docs: minor readme updates.

1.0.15

  • Docs: minor readme updates.

1.0.14

  • Fix: contractor sync and invoices — empty billing postcode (KodPocztowy) rejected by iFirma API (“adres.kodPocztowy nie może być puste”) while WooCommerce often has no postcode (e.g. UAE/Dubai and other countries, or omitted at checkout); we now substitute a configurable non-empty placeholder (default -). Override via WordPress filter devikit_ifirma_empty_postcode_placeholder.

1.0.13

  • Fix: OSS invoices — iFirma rejects KrajDostawy / Kontrahent.KodKraju GR (“Nieprawidłowy kraj dostawy… dwuliterowy kod ISO kraju z UE”); WooCommerce uses GR for Greece but the EU/VAT code expected in these fields is EL — same normalization as for PrefiksUE. Contractor KodKraju on sync also maps GR EL.

1.0.12

  • Docs: readme screenshots section updated for WordPress.org asset screenshots (screenshot-1 through screenshot-10).

1.0.11

  • Fix: contractor sync / WDT — Greek customers billing as GR: iFirma requires EU VAT prefix EL, not ISO GR; Kontrahent.PrefiksUE is now normalized (fixes “Podana wartość Kontrahent.PrefiksUE przyjmuje nieprawidłową wartość” when only a numeric tax/VAT-like ID is entered).

1.0.10

  • Fix: invoices for customers from Romania (RO) and Portugal (PT) failed with “Podana wartość pola Jezyk przyjmuje nieprawidłową wartość” — iFirma API does not support ro or pt language codes; both now fall back to en (English).

1.0.9

  • New: append “Reverse charge” (translatable) to invoice notes for orders billed outside Poland and outside the EU when a tax identifier (NIP / EU VAT / Tax ID) is saved on the order.
  • Fix: customer My Account invoice PDF download uses the same iFirma document type as the admin button (_ifirma_invoice_type: foreign, OSS, WDT), not always domestic.

1.0.8

  • Fix: when WooCommerce prices are entered including tax, send gross unit prices to iFirma with LiczOd BRT (domestic, proforma, foreign currency, OSS, WDT, rachunek, corrections). Aligns document totals and VAT split with order totals charged at checkout.

1.0.7

  • Fix: non-Poland billing addresses use fakturawaluta (not domestic fakturakraj) even when the order is in PLN — avoids issuing Polish domestic invoices for foreign companies.
  • Fix: fakturawaluta in PLN — do not send exchange-rate related fields (e.g. KursWalutyWidoczny, NBP rate); fixes iFirma error about exchange rate only applying to non-PLN invoices.

1.0.6

  • Fix: WDT invoices — add required API field Waluta and NBP rate when the document currency is not PLN.
  • Fix: contractors and WDT — send Kontrahent.PrefiksUE only for valid EU member-state VAT prefixes; avoid invalid values for non-EU customers or non-EU tax IDs (iFirma API validation).

1.0.5

  • Compatibility: resolve order tax identifier (NIP / EU VAT / foreign Tax ID) from multiple order meta keys so values saved by third-party plugins (WooCommerce EU VAT Number, nip-field-for-woocommerce, custom checkout fields, etc.) are sent to iFirma under the NIP label.
  • New filters: devikit_ifirma_order_tax_id_meta_keys (customize the list of checked meta keys) and devikit_ifirma_order_tax_id (override the resolved value).

1.0.4

  • Fix: save_admin_order_nip – handle WP_Post passed by woocommerce_process_shop_order_meta in some WooCommerce versions

1.0.3

  • Plugin title: Invoicing Integration for iFirma and WooCommerce

1.0.2

  • Editable NIP field in order meta (admin order edit screen)

1.0.1

  • 5-minute delay for automatic invoice email (KSeF processing)
  • Order column: total mismatch indicator (order vs document sum) with tooltip
  • Compiled translations (pl_PL.mo)

1.0.0

  • Initial release
  • Manual invoice generation
  • Customer synchronization
  • Advanced VAT mapping
  • Customer invoice download
  • NIP field support with compatibility
  • HPOS compatibility
  • WooCommerce Blocks checkout support