Own development. From Galicia.

[ WooCommerce ]

[B] Spanish NIF for WooCommerce

Automatic tax ID validation for your Spanish checkout

Works with WooCommerce

[B] Spanish NIF for WooCommerce

  • Mathematical validation of NIF, CIF and NIE according to the official Spanish algorithms
  • Works with WooCommerce Blocks and the classic checkout without additional setup
  • Real-time validation with auto-formatting and immediate visual feedback

What it solves

Si vendes en línea a clientes españoles o empresas, sabes que la captura correcta del NIF, CIF o NIE no es opcional: es un requisito legal para la facturación, la declaración de impuestos y el cumplimiento normativo. Pero hacerlo manualmente, sin validación, abre la puerta a errores de datos, rechazos de pagos y auditorías fiscales complicadas.

[B] Spanish NIF for WooCommerce resuelve este problema de raíz. El plugin añade un campo de identificación fiscal obligatorio a tu checkout que valida matemáticamente cada número según los algoritmos oficiales españoles. DNI, NIE, CIF con todos sus prefijos —el plugin los reconoce, los valida y los guarda de forma segura en tus órdenes. No hay trucos, no hay API externos, no hay dependencias frágiles. Solo validación local, rápida y confiable que funciona incluso sin conexión a internet.

Ya sea que gestiones una tienda de ropa, una agencia de servicios digitales, una distribuidora B2B o una plataforma de suscripciones, tus clientes —particulares, autónomos, empresas— necesitan un proceso de checkout fluido pero riguroso. El plugin se integra perfectamente con WooCommerce Blocks y el checkout clásico, ofrece validación en tiempo real con auto-formateo, y muestra el NIF en tus órdenes, correos de confirmación e informes administrativos sin que tengas que tocar una línea de código.

Compatibilidad total con WordPress 6.0+, PHP 8.1+, WooCommerce moderno y HPOS (High-Performance Order Storage). El plugin respeta GDPR y normativa AEPD: los datos se almacenan únicamente para fines de cumplimiento fiscal y procesamiento de pedidos, protegidos con los protocolos de sanitización nativos de WordPress. Tus clientes ven un campo limpio, intuitivo y accesible (WCAG 2.2 AA); tú ves datos validados, estructurados y listos para auditar.

Con la versión 1.3.1, hemos cerrado todas las brechas de seguridad críticas en la validación de licencias, asegurado que cada endpoint (AJAX, REST, admin) verifique permiso antes de procesar, e integrado el sistema de licencias [B] License Manager para que los usuarios premium desbloqueen edición de NIF en órdenes, validación en vivo en Blocks, y exportación a CSV/XML. Los usuarios gratuitos mantienen acceso a validación matemática, campo obligatorio y almacenamiento básico.

Instala, activa, y el campo aparece automáticamente en tu checkout. Configura el etiquetado, la prioridad, si es obligatorio, si se muestra en correos y en la lista de órdenes, y si prefieres validación estricta o solo formato. Soportamos fallback de pasaporte para clientes extranjeros, búsqueda de órdenes por NIF, integración con PDF invoices, y exportación de datos personales conforme a GDPR. Todo pensado para que tu operación sea más segura, más conforme y más ágil.

El soporte técnico y las actualizaciones están incluidos. Acceso a documentación completa, demo en vivo, y comunidad de usuarios españoles que ya confían en el plugin para procesar miles de órdenes cada mes sin errores. Invierte en una solución que no solo cumple normativa, sino que mejora la experiencia de compra y reduce tu carga administrativa. Porque en e-commerce, los datos limpios y validados no son un lujo: son el fundamento de un negocio que escala.

Watch the video

Features

Regulatory Compliance

Mathematical validation according to the official Spanish algorithms. Every NIF, CIF and NIE is checked before it is processed. Reduces the risk of tax audits, rejected payments and penalties for incorrect data. Your operation is legal and documented from the first order.

Total Automation, Zero Friction

No manual entry, no human errors. The customer types it, the plugin validates, stores and shows it automatically. Saves hours of data correction, reduces support tickets and processing delays. Your team focuses on selling, not on cleaning data.

Secure, Private Data

Local storage in WordPress without external APIs. GDPR/AEPD compliance. Your customers trust that their tax data is protected. Automatic export and erasure on request. Transparency and security that build trust and loyalty.

Scalability Without Limits

Validate 1 order or 10,000 without slowing down. An optimised algorithm, no server load. Native integration with HPOS. Grow your business without worrying about the validation infrastructure. From startup to agency, the plugin grows with you.

A Better Customer Experience

An intuitive field, instant feedback, auto-formatting. Customers are not frustrated by validation errors. A faster checkout, fewer abandonments. Your customers feel a professional, reliable process that reflects the quality of your brand.

Complete Tax Integration

The NIF appears in orders, emails, PDF invoices, admin search and CSV/XML exports. Your tax data is centralised, accessible and ready for accounting, auditing or integration with ERP software. A single source of truth for tax data.

Everything it includes

  • Local validation engine with no external dependencies
  • Support for DNI, NIE, CIF (including the K, R, N and S prefixes)
  • Native integration with WooCommerce HPOS (High-Performance Order Storage)
  • Configurable field: label, placeholder, priority, mandatory/optional
  • Real-time validation via AJAX with a spinner and status icons
  • Auto-formatting to upper case and input normalisation
  • NIF shown in admin orders, emails and invoices
  • Advanced order search by NIF/CIF/NIE number
  • Optional column in the admin orders list
  • Integration with WooCommerce CSV/XML Export (with license)
  • Integration with PDF Invoices (WooCommerce PDF Invoices, WP Overnight)
  • Compliance with GDPR data export and erasure requests
  • Support for a passport fallback in non-Spanish countries
  • Licensing built in with [B] License Manager for the premium features

Who it is for

B2C E-commerce (Fashion, Electronics, Food)

Online stores that sell to Spanish consumers. They need the NIF for invoicing and tax compliance. The plugin validates automatically, reduces errors and speeds up order processing. Ideal for stores with 100-10,000 orders a month.

B2B and Distribution

Platforms that sell to companies, self-employed people and distributors. They require a valid CIF from the corporate customer. The plugin validates every CIF prefix, integrates with ERPs and allows order search by NIF for audits. Essential for tax compliance.

Digital Services and SaaS

Subscription platforms, online courses, software. They need correct tax data for recurring invoicing and AEPD compliance. The plugin validates at the first payment and reuses the data in automatic renewals. Reduces rejected payments and disputes.

Agencies and Resellers

Agencies that sell WooCommerce to several Spanish clients. They need a plug-and-play solution with no maintenance. The plugin has an agency license (10 sites for €119/year), priority support and documentation for end clients.

Stores with Complex Invoicing

Businesses that integrate with accounting software, ERPs or legacy systems. The plugin exports the NIF to CSV/XML, has hooks for developers and allows editing the data in existing orders. A perfect base for custom integrations.

How it works

  1. Install the plugin

    Download it from WordPress.org or buy a license at baqueiro.es. Upload it to /wp-content/plugins/ and activate it from the dashboard. It requires WordPress 6.0+ and PHP 8.1+.

  2. Set up the basic options

    Go to WooCommerce > Settings > NIF / CIF / NIE. Adjust the label, placeholder, mandatory/optional, and display in emails and orders. The default values work for most Spanish stores.

  3. Test it in the checkout

    Open your store in incognito mode. Try an order with a valid NIF (e.g. 12345678Z). Check that it validates correctly and appears in the order. Try an invalid NIF to confirm that it is rejected.

  4. Activate the license (optional)

    If you need NIF editing in orders, live validation in Blocks or CSV/XML export, buy a license at baqueiro.es. Go to Tools > License, enter your key and activate it. The premium features are unlocked instantly.

  5. Integrate it with invoices (optional)

    If you use WooCommerce PDF Invoices or WP Overnight, the NIF appears automatically in your PDFs. No additional setup. Check it on a test invoice.

Why [B] Spanish NIF for WooCommerce?

Comparison with common alternatives

Aspect Spanish NIF for WooCommerce Other solutions
Local mathematical validation (no API) Yes, official Spanish algorithm built in Requires an external API (slow, expensive, single point of failure)
Support for CIF with every prefix Yes, including K, R, N, S (foreign companies) Limited to common prefixes, rejects valid ones
WooCommerce Blocks integration Native, with real-time validation Only the classic checkout, or requires additional plugins
NIF editing in existing orders Yes, from the admin dashboard with nonce No, read-only data
Built-in GDPR/AEPD compliance Yes, with export and erasure hooks Manual, or requires additional privacy plugins
Passport fallback for foreigners Yes, configurable by country Rejects every non-Spanish document
Price Free + premium options from €49/year Monthly subscription of €15-30 or an expensive custom solution

Before installing

PHP
8.1+
WordPress
6.0+
Tested up to
WordPress 6.7
Current version
1.3.4
Requires
woocommerce

Documentation See the demo

Questions before you start

Does it work with WooCommerce Blocks and the classic checkout?

Yes, completely. The plugin integrates natively with both. In WooCommerce Blocks, it offers real-time validation via AJAX with auto-formatting. In the classic checkout, it works just as smoothly. You need no special setup; the field appears automatically.

Which types of documents does it validate?

DNI (Documento Nacional de Identidad) for Spanish citizens, NIE (Número de Identidad de Extranjero) for foreign residents, and CIF (Código de Identificación Fiscal) for companies. The plugin validates every official prefix: A-H, J-N, P, Q, R, S, U, V, W for CIF; X, Y, Z for NIE; and 8 digits + a letter for DNI. It also supports a passport fallback for customers in non-Spanish countries if you turn it on in the settings.

Is it secure? Is it GDPR compliant?

Completely. The plugin stores the NIF only in WooCommerce order metadata, protected with the native WordPress sanitisation. We do not send data to external servers or third parties. We comply with the AEPD (the Spanish Data Protection Agency) and GDPR: your customers can request the export or erasure of their data, and the plugin automatically integrates those flows into WooCommerce. You can check the privacy policy registered on your site.

Do I need a license to use the plugin?

No. The free version includes complete mathematical validation, a mandatory field in the checkout, secure storage in orders, display in emails and in the admin dashboard, and order search by NIF. The license (from €49/year) unlocks NIF editing in orders, live validation in WooCommerce Blocks and export to CSV/XML. You can evaluate the plugin fully without paying anything.

Does it validate in real time or only when the form is submitted?

In WooCommerce Blocks with an active license, validation happens in real time via AJAX: the customer sees a green ✓ or a red ✗ while typing, with auto-formatting to upper case. In the classic checkout, validation happens when clicking "Place order", ensuring security (it prevents brute force attacks). In both cases, if the NIF is invalid, WooCommerce blocks the order and shows a clear error message.

Can I edit the NIF after the order is created?

With an active license, yes. In the orders dashboard, you will see an editable NIF field in the billing section. You can correct the value, and it is saved with nonce protection. Without a license, the field is shown as read-only text, with a link to activate the license. This is useful if a customer makes a mistake or if you need to correct data in audits.

What if a foreign customer has no Spanish NIF?

There are two options. First: the field is mandatory and rejects anything that is not a valid NIF/CIF/NIE, which is correct if you only sell to Spain. Second: turn on the "Passport fallback" option in the settings and the plugin will let customers in non-Spanish countries enter any ID (passport, ID card, etc.) without strict validation. This is ideal if you have international customers.

Does it integrate with my PDF invoices?

Yes. The plugin has specific hooks for "WooCommerce PDF Invoices" and "WP Overnight PDF Invoices & Packing Slips". The NIF appears automatically in the billing data section of your PDFs. If you use another invoice plugin, you can use the `bdw_nif_for_pdf_invoice` hook to integrate it by hand.

Can I export orders with the NIF to CSV or XML?

With an active license, yes. If you have "WooCommerce Customer/Order CSV Export" installed, the plugin automatically adds a NIF column to the exported files. This is perfect for tax reconciliation, audits and accounting reports. Without a license, the column is not included in the exports.

How long do installation and setup take?

5 minutes. Install and activate the plugin from the WordPress dashboard. The field appears automatically in your checkout. Then go to WooCommerce > Settings > NIF / CIF / NIE to adjust the label, placeholder, whether it is mandatory, whether it is shown in emails, in the orders list, etc. The default values work for most Spanish stores.

What technical support do I get?

Every user gets access to complete documentation, a live demo and an FAQ repository. Users with an active license are entitled to support by email and chat, Monday to Friday, 9:00-18:00 CET. We reply within 24 h. If you need business support or a 24/7 SLA, see the Business plan.

Updates and versions

1.3.4
1.3.3