ALMC Electronic Invoicing for VeriFactu connects your online store with the ALMC SaaS API (
almc.es) so you can comply with the electronic invoicing specification published by the Spanish Tax Agency (AEAT - Agencia Estatal de Administracion Tributaria) under Royal Decree 1007/2023 (the "VeriFactu" specification). The plugin is compatible with WooCommerce.
This plugin is
not affiliated with or endorsed by the AEAT. "VeriFactu" is the public technical name of the AEAT specification it implements.
Verifactu is mandatory for businesses and self-employed individuals in Spain that issue invoices using electronic billing software. This plugin automates the entire signing and submission flow so you do not have to think about it.
Main features
- Automatic submission of invoices to AEAT when orders are completed
- Manual submission from the order detail page
- Full mapping of WooCommerce orders to VeriFactu invoices (items, taxes, shipping, fees)
- Status panel on each order with visual badges (draft, accepted, rejected, etc.)
- Webhook receiver for automatic status updates
- Customer NIF/CIF support via customizable meta fields
- Compatible with HPOS (High-Performance Order Storage)
- Support for corrective invoices (R1-R5) substitutive or by differences
Requirements
- WordPress 5.8 or higher
- WooCommerce 6.0 or higher
- PHP 7.4 or higher
- An active account on VeriFactu SaaS (almc.es/verifactu)
- A VeriFactu API key
Step 1 - Create your VeriFactu SaaS account
Go to
https://almc.es/verifactu/register and create an account with your company details (business name, VAT/Tax ID). You will receive a welcome email.
Step 2 - Upload your digital certificate
Log in to
https://almc.es/verifactu/login and go to the "Certificates" section. Upload your representative certificate (.p12 or .pfx) along with its password. The system will encrypt it using HKDF; the password is NEVER stored in plain text. This certificate is what VeriFactu uses to sign invoices sent to AEAT.
If you do not have a digital certificate yet, you can obtain one for free from
https://www.sede.fnmt.gob.es/certificados (for company representatives) or use your electronic ID.
Step 3 - Create an invoicing series
In the VeriFactu panel, "Series" section, create a new series (e.g. "A", "WC-2026" or any code you prefer). This series will be associated with the invoices the plugin sends from your online store.
Step 4 - Generate an API key
In the VeriFactu panel, "API Keys" section, click "Create new key". Give it a descriptive name (e.g. "WooCommerce -
mystore.com"). The system will display the key ONLY ONCE in the format
vfk_test_... (sandbox) or
vfk_live_... (production). Copy it to a safe place: if you lose it you will have to generate another one.
Step 5 - Install the plugin in WordPress
Three options:
a) From the WordPress repository: go to Plugins > Add New, search for "ALMC Electronic Invoicing for VeriFactu" and click "Install Now" then "Activate".
b) Manually (.zip): download the
almc-electronic-invoicing-verifactu.zip file, go to Plugins > Add New > Upload Plugin, select the zip and click "Install Now" then "Activate".
c) Via FTP: unzip the file and upload the
almc-electronic-invoicing-verifactu folder to the
/wp-content/plugins/ directory of your installation. Then activate it from the Plugins menu.
Step 6 - Configure the VeriFactu connection
Go to WooCommerce > VeriFactu in the admin sidebar. Fill in:
- "API Key": paste the key generated in Step 4
- "Series Code": the series code created in Step 3 (e.g. "A")
- "Environment": choose "Sandbox" for testing or "Production" when ready to issue real invoices
Click "Save changes". Then click "Test connection" to verify everything is working. If everything is fine you will see a green message with the active plan.
Step 7 - Configure the customer NIF field
On the same settings page, in "NIF meta field", indicate the name of the meta field where your checkout stores the customer NIF. The most common values:
_billing_nif (Spanish checkout plugins such as Spain Tax ID)
_billing_vat (European variants)
_billing_cif
billing_dni (some custom checkout plugins)
If you do not know which one your checkout uses, leave the default
_billing_nif or check the database of your first test order (table
wp_postmeta).
Step 8 - Enable automatic submission (optional but recommended)
In the "Automatic submission" section, check "Enable automatic submission" and choose the order statuses that trigger the submission. The most common:
completed (recommended for cash-on-delivery stores)
processing (if you bill before physical shipment is complete)
You can also leave it disabled and submit manually from each order.
Step 9 - Configure the webhook (optional)
If you want VeriFactu to notify you of invoice status changes (accepted / rejected by AEAT) in real time, copy the URL shown in the plugin "Webhook" section and paste it into the VeriFactu panel, "Webhooks" section. The HMAC signing secret is generated automatically.
Step 10 - First test order
With the environment set to "Sandbox":
- Create a test product in your store
- Place an order to yourself (use a customer with a valid NIF/CIF)
- Mark the order as "Completed"
- In the order detail you will see the "VeriFactu" metabox with the status and assigned invoice number
- If everything is fine: the status will become "Accepted" in a few seconds and you will see the AEAT receipt number (CSV)
Once this flow works in sandbox, switch the environment to "Production", save and start issuing real invoices.
Troubleshooting
- "Invalid recipient NIF": the plugin pre-validates the NIF before sending. Make sure the customer has a NIF/CIF that complies with the Spanish control algorithm. If your checkout does not validate it, consider using a plugin such as "Spain Tax ID" for WooCommerce.
- "API key not configured": double-check that you pasted the key correctly (starts with
vfk_test_ or vfk_live_).
- The order status changes but the invoice is not sent: check that you marked the corresponding status under "Automatic submission" and that the API connection responds OK with "Test connection".