=== Factukit: Checkout Fields for Verifactu ===
Contributors: wpverifactu
Tags: verifactu, invoices, woocommerce, wpverifactu, checkout
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Add fiscal identification fields to WooCommerce checkout for Verifactu compliance.
== Description ==
The "Factukit: Checkout Fields for Verifactu" plugin is a WooCommerce extension that adds fiscal identification fields to the checkout. It allows invoicing software systems (SIF), accounting software ERPs and other business management systems to collect the necessary data to submit invoices to the Spanish Tax Agency's Verifactu system.
To submit invoices to Verifactu, in addition to installing the plugin, it is necessary to create an integration with an official invoicing software system valid for the AEAT, such as WP Verifactu: https://wpverifactu.com.
https://vimeo.com/1209886768
= Main Features =
- **Invoice downloads from WooCommerce**: Once an invoice has been issued, it can be downloaded directly from WooCommerce — from the orders list page, from within the individual order, and by the customer from the "My account" page. The administrator can choose from the admin settings whether this download functionality is displayed or not
- **Adds mandatory fields** to WooCommerce checkout for customer fiscal identification
- **Support for multiple document types**: NIF/CIF (DNI, CIF), Passport, NIE, Residence Certificate, Other supporting documents and Not registered
- **Real-time validation** of NIF/NIE format with control digit verification algorithm
- **Integrated VIES validation** for European VAT numbers with automatic verification against the official European database
- **Automatic VAT exemption** for intra-community transactions validated by VIES
- **"Customer Type" field** that allows users to define their tax profile:
- **Individual**: For natural persons making personal purchases
- **Business/Self-employed**: For companies, freelancers and professionals requiring business invoicing
- **Company Name** that appears automatically when "Business/Self-employed" is selected
- **Form simplification** hiding unnecessary fields when "Individual" is selected
- **Flexible configuration**: Checkout fields can be mandatory or optional according to WordPress management panel configuration
- **€3,000 limit**: When optional fields are enabled, they become mandatory automatically for purchases over €3,000
- **Tax classes**: Automatic creation of specific WooCommerce tax classes with their tax rates: exempt online courses (WPV_CURSO_0), travel inside the EU (WPV_VIAJES_UE), travel outside the EU (WPV_VIAJES_FUERA_UE) and services subject to Spanish VAT at the general, reduced and super-reduced rates (WPV_SERVICIO_21, WPV_SERVICIO_10, WPV_SERVICIO_4)
- **Multiple languages**: Support for Spanish, Catalan, Basque and Galician
- **Processing to Completed status changes**: The plugin allows changing status from Processing to Completed automatically when an order is placed, from the WordPress management panel
= Requirements =
* WordPress 5.8 or higher
* WooCommerce 5.0 or higher
* PHP 7.4 or higher
== Installation ==
1. In the WordPress content manager, go to Plugins > Add New.
2. Search for "Factukit: Checkout Fields for Verifactu" and click "Install Now", then activate it.
3. The plugin is now activated. Whether you use blocks checkout or classic checkout, the fields will automatically appear in the store.
4. In the Woocommerce > Verifactu Tax Fields, panel in the menu, you can choose whether you want the added fields to be optional.
== Legal Notice ==
The use of Factukit: Checkout Fields for Verifactu does not ensure compliance with tax obligations. It is exclusively the responsibility of each user to verify that their system and invoicing processes comply with current legislation.
== Frequently Asked Questions ==
= Does the plugin send invoices to Verifactu? =
No, the plugin only adds the necessary fields so that invoicing software systems can process the data and send it to Verifactu. We recommend integrating the e-commerce with programs like WP Verifactu https://wpverifactu.com.
= Do I need a subscription? =
Not to use the plugin. However, to be able to submit to Verifactu it will be necessary to integrate with an invoicing software system which may require a subscription.
= What invoicing software system can I use? =
The plugin is designed to integrate with WP Verifactu https://wpverifactu.com.
= Can I download the invoices directly from WooCommerce? =
Yes. Once an invoice has been issued, it can be downloaded directly from WooCommerce without leaving your store. Administrators can download it from the orders list page and from within each individual order, while customers can download their own invoices from the "My account" page. This functionality can be enabled or disabled from the plugin's admin settings, so you decide whether these download options are displayed.
== External Services ==
This plugin validates European VAT numbers by connecting to external services during checkout. When a customer enters a VAT number with a European country prefix (e.g., ES123456789, FR12345678901), the plugin first attempts validation through the official EU VIES (VAT Information Exchange System) provided by the European Commission. VIES is the official European Union service for validating VAT registration numbers across EU member states. When validation is performed, only the VAT number and country code are sent to the VIES REST API at https://ec.europa.eu/taxation_customs/vies/rest-api. The European Commission's privacy policy can be found at https://commission.europa.eu/privacy-policy-websites-managed-european-commission_en and their legal notice at https://commission.europa.eu/legal-notice_en.
If the official VIES service is unavailable, the plugin uses VATcomply as a fallback validation service. VATcomply is a free, open-source VAT validation API that acts as an intermediary wrapper to access the same official EU VIES database through a simplified interface. Since VATcomply connects to the same European Commission VIES system for validation, the same privacy policies and legal notices apply as mentioned above. When used, only the VAT number and country code are transmitted to https://api.vatcomply.com/vat. More information about VATcomply can be found at https://www.vatcomply.com and their open-source code is available at https://github.com/madisvain/vatcomply.
No personal information, order details, or customer data is shared with either service - only VAT numbers and country codes are transmitted for validation purposes. Validation requests are cached for 24 hours to minimize external requests and improve performance.
== Support ==
For support, bug reports, or feature requests, please contact us through:
* **Support Email**: info@wpverifactu.com
* **Official invoicing software system**: https://wpverifactu.com
* **Documentation**: Visit our comprehensive documentation: https://doc.wpverifactu.com
== Screenshots ==
1. **WordPress Admin Settings** - Plugin configuration panel showing "Optional Fields" toggle and "Change Processing to Completed" setting for automated order status management
2. **WooCommerce Blocks Checkout** - Modern checkout interface displaying the new fiscal identification fields including Customer Type selector, Company field, Document Type dropdown and ID Number field with real-time validation
3. **WooCommerce Classic Checkout** - Classic checkout interface showing the fiscal identification fields (Customer Type, Document Type and ID Number) integrated into the address form
4. **Invoice download from the admin panel** - Downloading invoices directly from the WordPress admin panel (orders list and order detail)
5. **wpverifactu.com Dashboard** - The WP Verifactu dashboard where issued invoices are managed
6. **Invoice download from the WooCommerce order** - Downloading the invoice directly from within the WooCommerce order
7. **Invoice download from My account** - Customers downloading their invoices from the "My account" page
== Changelog ==
= 1.1.7 =
* New WPV_EVENTO_FISICO_21 and WPV_EVENTO_FISICO_10 tax classes for tickets to on-site events held in Spain, which always carry Spanish VAT for every customer.
* VAT exemptions (VIES or extra-EU) are no longer applied when the cart contains on-site event tickets.
* Restored Spanish VAT for all customers as the default rates of the WPV_SERVICIO_21/10/4 tax classes, with automatic migration of unmodified rate tables.
= 1.1.6 =
* Fiscal fields now also available in the admin order screen and the user profile, with automatic pre-fill at checkout for logged-in customers.
= 1.1.5 =
* Passport number validation (5-20 letters or numbers) in both checkouts.
* The "07 Not registered" identifier type is now only available when the billing country is Spain.
= 1.1.4 =
* Fixed WPV_SERVICIO_21 default rates: 0% for the Canary Islands, Ceuta and Melilla and outside the EU, with automatic migration.
* New WPV_SERVICIO_10 and WPV_SERVICIO_4 tax classes for the reduced and super-reduced Spanish VAT rates.
= 1.1.3 =
* New WPV_SERVICIO_21 and WPV_VIAJES_UE tax classes; WPV_VIAJES renamed to WPV_VIAJES_FUERA_UE with automatic migration.
* Automatic VAT exemption at checkout for business customers outside the EU or in the Canary Islands, Ceuta and Melilla.
* Admin invoice buttons now only appear once the invoice has been issued, backed by a new background sync of the invoice status.
= 1.1.2 =
* Description improvements for the repository.
= 1.1.1 =
* Invoice download, email link and admin status now work even when a firewall blocks WP Verifactu from writing back to WooCommerce.
* More reliable downloads and earlier invoice link in the customer order email.
* New settings to show the invoice download in the admin and in "My account" (disabled by default).
= 1.1.0 =
* Invoice download buttons in the admin panel, in the customer order email and in the "My account" area.
= 1.0.4 =
* Fixed classic checkout errors that prevented completing the purchase without VIES validation.
= 1.0.3 =
* ID validation correction in the classic checkout.
= 1.0.2 =
* Real-time local validation and identifier normalization in both checkouts.
* Tax cleanup and refresh at checkout.
= 1.0.1 =
* Local checksum validation for NIF/CIF and VAT validation via VIES with VATcomply fallback and cache.
* Improved Company field visibility and validation in the blocks checkout.
= 1.0.0 =
* Initial plugin version.
== Upgrade Notice ==
= 1.0.2 =
Important update with real-time validation improvements and better checkout compatibility. Recommended for all users.
= 1.0.1 =
Major update adding VIES validation, local checksum validation, and improved blocks checkout support. Upgrade recommended.