
Gwii Invoice Hash for WooCommerce is a small utility for Spanish online shops. When an order is completed it computes, inside your own WordPress server, the SHA-256 chained invoice hash (“huella”) and the QR verification URL of the Spanish Tax Agency (AEAT), following the AEAT technical document v0.1.2 and chapter VIII of Orden HAC/1177/2024 (the “VeriFactu” invoicing regulation).
This plugin is developed independently by an individual developer. It is not affiliated with, endorsed by or certified by the Agencia Estatal de Administración Tributaria (AEAT), Automattic or WooCommerce. “VeriFactu” refers to the AEAT regulation the plugin implements; “WooCommerce” refers to the e-commerce plugin it extends.
What it does
- SHA-256 chained hash built from the 8-field canonical string defined in the specification. The calculation matches the three official test vectors published by the AEAT.
- Sequential invoice numbering, independent from the WooCommerce order ID.
- Database lock (MySQL
GET_LOCK, or an atomic row lock on SQLite) so that two orders completed at the same time cannot break the chain. - Timestamps in the WordPress time zone (+01:00 / +02:00 in Spain).
- Cancellation record chained to the previous hash when a registered order is cancelled or fully refunded.
- QR verification URL with the four official parameters:
nif,numserie,fechaandimporte. - HPOS compatible and integrates with WooCommerce PDF Invoices & Packing Slips (adds text rows with the invoice number, hash and URL).
- No external services: no API keys, no data sent to third parties.
What it does NOT do
- It does not generate or sign the XML invoice record.
- It does not submit records to the AEAT.
- It does not keep the event log nor provide the manufacturer’s responsible declaration required by RD 1007/2023.
- It does not handle partial refunds (corrective invoices).
- It does not embed the QR image in the PDF (only the URL and the hash as text).
On its own it does not turn a shop into an invoicing system compliant with RD 1007/2023. It is a calculation building block you can use as a base or to verify another implementation.
The admin interface is currently in Spanish, as the regulation only applies to businesses in Spain.