=== Invoicing Integration for Axonaut and WooCommerce ===
Contributors: devikit
Tags: woocommerce, axonaut, invoice, france, accounting
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.13
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Connect WooCommerce with Axonaut for professional French invoicing - invoices, customers, and PDF downloads.

== Description ==

**Invoicing Integration for Axonaut and WooCommerce** creates real Axonaut invoices from WooCommerce orders, directly from the WordPress admin.

https://youtu.be/pWuJst_4IDc

Devikit does not host your billing data or API credentials. There is **no invoice quota** inside Free or PRO - limits follow your Axonaut subscription only.

= Key Features (FREE) =

* **Manual invoice per order** — create a native Axonaut invoice from the WooCommerce order screen.
* **Customer sync** — find or create Axonaut companies and contacts with billing address, email, VAT number (N° TVA), and SIRET.
* **VAT number + SIRET checkout fields** — classic checkout and WooCommerce Blocks, with detection of common EU VAT plugins to avoid duplicate fields.
* **Invoice checkbox mode** — always show SIRET / VAT fields, or show them only when the customer asks for an invoice (classic checkout).
* **Optional format validation** — SIRET (14 digits) and EU VAT number format checks.
* **Tax mapping** — WooCommerce tax rates mapped to matching rates in your Axonaut account.
* **Payment deadline** — choose how many days the customer has to pay (0–60); applied on each Axonaut invoice.
* **PDF download** — download Axonaut PDFs from the WordPress admin and from **My Account → Orders → View order**.
* **Debug logging** — optional detailed logs in WooCommerce → Status → Logs.
* **Uninstall option** — choose whether to keep settings and order meta when uninstalling.
* **HPOS compatible** — works with the latest WooCommerce order storage.
* **Blocks checkout** — VAT / SIRET fields work with classic and block checkout.

= PRO Features =

Upgrade when you need hands-off invoicing and richer tax handling:

* **Automatic invoice creation** — create invoices when selected order statuses are reached, with automatic retries if something fails temporarily.
* **Issuing condition** — for all orders, only when SIRET is provided, or only when SIRET is missing.
* **Mark as paid in Axonaut** — record payment in Axonaut when the WooCommerce order is paid and totals match.
* **Send Invoice PDF** — WooCommerce email with the Axonaut invoice PDF attached.
* **Bulk create** — create invoices for many orders at once; download PDFs as a ZIP.
* **Invoice mentions / notes** — custom text on Axonaut invoices (you can insert order details).
* **Invoice language** — optional document language from your Axonaut account languages.
* **EU B2B reverse charge (autoliquidation)** — for EU business buyers with a VAT number outside France.
* **EU OSS (B2C)** — destination VAT rates taken from WooCommerce for private customers outside France.
* **Priority email support**.

[**Get PRO Version**](https://devikit.fr/produit/axonaut-woocommerce-pro/)

Documentation: [https://devikit.fr/documentation/axonaut-woocommerce-pro/](https://devikit.fr/documentation/axonaut-woocommerce-pro/)

= Requirements =

* WordPress 5.8 or higher
* WooCommerce 5.0 or higher
* PHP 7.4 or higher
* Active Axonaut account with a user API key

== Installation ==

1. Upload the `invoicing-integration-for-axonaut-and-woocommerce` folder to `/wp-content/plugins/`, or install from the WordPress Plugins screen.
2. Activate the plugin.
3. Open **WooCommerce → Axonaut**.
4. In Axonaut, click the **wrench** icon (settings), then **API**, create a user API key, paste it into the Connection tab, and click **Test Connection**.
5. Set the payment deadline and checkout VAT / SIRET behavior.
6. Create invoices from the WooCommerce order screen.

== Frequently Asked Questions ==

= Where do I get my Axonaut API key? =

In Axonaut, click the **wrench** icon (settings), then open **API**, create a user API key, paste it into **WooCommerce → Axonaut**, and run **Test Connection**.

= Does Devikit see my API key? =

No. The key is stored in your WordPress database only and is sent only to Axonaut when the plugin calls their API.

= Does the free plugin create invoices automatically? =

No. The free version creates invoices when you click **Create Invoice** on an order. Automatic creation, emails, mark as paid, and bulk actions need [PRO](https://devikit.fr/produit/axonaut-woocommerce-pro/).

= Does this plugin limit how many invoices I can create? =

The plugin does not enforce its own invoice quota. Usage is subject to your Axonaut subscription and API limits.

= Can customers download their invoice PDF? =

Yes, after an Axonaut invoice exists for the order, from **My Account → View order**.

= Is HPOS supported? =

Yes. It works with the latest WooCommerce order storage.

= Does this work with WooCommerce Blocks? =

Yes. Classic and block checkout are supported for VAT / SIRET fields. Optional “I want an invoice” checkbox mode is classic-checkout only; on Blocks the fields stay visible when not hidden.

= What happens when I uninstall the plugin? =

By default, plugin settings are removed from WordPress. You can enable **Keep settings and order meta when uninstalling** under Advanced. Your invoices and companies in Axonaut are not deleted.

== External services ==

This plugin communicates with the **Axonaut API**, operated by DIGITICA (Axonaut), to sync customers and create or retrieve invoices.

= What is the Axonaut API? =

Axonaut is a French business management and invoicing platform. This plugin uses the official API at `https://axonaut.com/api/v2/` to:

* Authenticate with your user API key
* Test the connection
* Search, create, and update companies and contacts
* Create invoices and download PDFs
* (With PRO installed and licensed) set invoice mentions and language, apply reverse charge / OSS tax options, record payments, send invoice emails, and run automation / bulk tools

Official website: [https://axonaut.com/](https://axonaut.com/).

= What data is sent and when? =

**When you create an invoice manually (FREE):**

* Customer: name, company, email, phone, billing address, VAT number (N° TVA), SIRET
* Order: line items (title, quantity, amounts, tax rates), shipping, fees, order date/reference, payment deadline

**When you test the connection or load settings:**

* Your user API key for authentication
* Read-only connection checks and lookups (for example taxes / languages when needed)

**When you or a customer downloads a PDF:**

* The related invoice identifier to fetch the PDF from Axonaut

**FREE plugin:** no Axonaut traffic runs on its own without your action (manual invoice, connection test, or PDF download).

**With PRO** (automation, mark paid, email, bulk): additional order data may be sent according to PRO settings when order statuses change or you run bulk actions.

= Service provider information =

* **Service name:** Axonaut API
* **Website:** [https://axonaut.com/](https://axonaut.com/)
* **API base URL:** `https://axonaut.com/api/v2/`
* **Plugin documentation:** [https://devikit.fr/documentation/axonaut-woocommerce-pro/](https://devikit.fr/documentation/axonaut-woocommerce-pro/)
* **Terms of Service:** [https://axonaut.com/cgv/gtc.pdf](https://axonaut.com/cgv/gtc.pdf)
* **Privacy Policy:** [https://axonaut.com/cgv/privacy_policy_en_2024.pdf](https://axonaut.com/cgv/privacy_policy_en_2024.pdf)

By using this plugin, customer and order data needed for invoicing is transmitted to Axonaut. You are responsible for GDPR compliance and for informing customers about this processing.

== Screenshots ==

1. Plugin settings
2. Plugin settings
3. Plugin settings
4. Plugin settings
5. Plugin settings
6. Plugin settings
7. Plugin settings
8. Plugin settings

== Changelog ==

= 1.0.13 =
* Fix: After coupon expiry, restore usage and generic PRO banners.

= 1.0.12 =
* Fix: Prefer bundled plugin translations over stale WP_LANG_DIR language packs.

= 1.0.11 =
* Fix: Rebuild language files so coupon upsell strings compile correctly.

= 1.0.10 =
* Add: Personalized first-year PRO coupon upsell for eligible FREE installs (30 days + 5 documents).
* Improve: Banner priority so coupon and usage notices do not stack with the generic PRO banner.

= 1.0.7 =
* Fix: Plugin URI points to Devikit PRO product page.
= 1.0.6 =
* Use direct ZIP URL for updates (skip /download/free/ stats endpoint)

= 1.0.5 =
* Use the French Devikit domain for the FREE update manifest URL

= 1.0.4 =
* Add: automatic updates from Devikit (self-hosted FREE after WordPress.org removal)
* Load bundled translations from the plugin languages directory

= 1.0.3 =
* Load bundled translations from the plugin languages directory

= 1.0.2 =
* Maintenance release

= 1.0.0 =
* Initial release - Axonaut API, manual invoices, PDF, FR VAT/SIRET
* Payment deadline on Axonaut invoices
* Checkout SIRET / VAT fields (classic and Blocks)
* Debug logging and uninstall data retention option

== Upgrade Notice ==

= 1.0.5 =
Update manifest URL aligned with the French Devikit site.

= 1.0.4 =
Adds Devikit automatic updates for the FREE plugin.
