Build tax-compliant invoicing
into your own software.

Cofactu for developers

Your system creates the invoice; Cofactu validates it, numbers it, chains it and takes it to the AEAT (Spanish Tax Agency). You receive the response by webhook and can let an AI agent query your data.

Read the documentation ↗

89 operations · 39 webhook events · 44 permissions · 45 MCP tools

Where you come in

Three doors, one company

What you do not have to build

Your system talks to Cofactu.
Cofactu talks to the AEAT.

Base, tax and total come from the same engine the application uses, and numbering follows the company's series. On issue, Cofactu generates the VeriFactu record, chains the hash and submits it with each company's certificate.

If the AEAT is slow or fails, Cofactu retries. When it answers, your system receives the CSV (secure verification code) or the reason for the rejection, explained. No XML, no signing, no queues to maintain.

Invoices and VeriFactu in the documentation ↗
What you can build

What you can
connect to Cofactu.

  1. 01 Your ERP Invoice from your management software and leave VeriFactu compliance to Cofactu.
  2. 02 Your shop Every Shopify, WooCommerce, PrestaShop or Magento order, turned into an invoice.
  3. 03 Your payments Mark invoices as paid when your payment gateway confirms the payment.
  4. 04 Your transport Services, deliveries and DeCA (electronic transport control documents) created from your order system.
  5. 05 Your assistant Ask Claude or ChatGPT how much you are owed or how the quarter's VAT is going.
What the API covers

89 operations,
organised by job.

Figures read from the published OpenAPI.

Cofactu API operations by area (OpenAPI 1.0.0)
AreaResourcesOperations
SalesCollections · Invoices · Reports · Quotes and delivery notes26
Contacts and catalogueCustomers · Catalogue10
PurchasesExpenses and suppliers9
LogisticsLogistics23
Freight forwardingFreight forwarding9
PlatformSystem · API Keys · Webhooks12

Each operation has its own page in the reference, with schemas, examples and a panel to try it.

The contract

Nothing breaks in /api/v1.

A field is never deleted or renamed, a validation is never tightened and the meaning of a value never changes: it only adds. Anything that would break goes to a v2. An integration that works today keeps working.

Idempotency and versioning ↗
Frequently asked questions

What integrators ask

Which plan includes the API?

The API is included from the SME plan, and on the Free plan with the Dispatch add-on. There is no request quota per plan: only a rate limit to curb abuse. See pricing

How does an integration authenticate?

With an API key. Each key carries only the permissions you choose from 44, by resource and action, and you rotate or revoke it from the account settings. Authentication and permissions

Can the API change and break my integration?

Not in v1. /api/v1 never deletes or renames fields, never tightens validation and never changes the meaning of a value: it only adds. Anything that would break goes to a v2. Versioning

Do I have to generate the VeriFactu XML or sign it myself?

No. You send the invoice data; Cofactu generates the record, chains the hash, submits it to the AEAT (Spanish Tax Agency) with the company's certificate and retries if the AEAT does not respond.

How do I know the AEAT accepted the invoice?

Submission is asynchronous. When the AEAT responds, Cofactu notifies you by webhook with the CSV (secure verification code) or with the code and the reason for the rejection. If your server does not answer, delivery is retried up to 9 times. Webhooks

Can I connect an AI assistant instead of writing code?

Yes. The MCP server gives Claude, ChatGPT, Cursor or VS Code 45 tools, with the same company and the permissions you grant. Nothing is sent to the AEAT from an agent: at most, it leaves a draft. MCP server

(Start today)

Invoice with VeriFactu, file with the AEAT and keep your books in the same account. Start free: no card, nothing to install.

Your first invoice

  • Unlimited VeriFactu invoices with QR
  • No card needed
  • Full export of your data