Build tax-compliant invoicing
into your own software.
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.
89 operations · 39 webhook events · 44 permissions · 45 MCP tools
Three doors, one company
01For your backend API REST JSON over HTTPS, with pagination, readable errors and permissions per resource. Getting started ↗
02To react Webhooks 39 signed events: your system finds out without asking. Webhooks ↗
03For AI agents MCP server 45 tools so an AI assistant can query data and prepare drafts. MCP server ↗ 

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
connect to Cofactu.
- 01 Your ERP Invoice from your management software and leave VeriFactu compliance to Cofactu.
- 02 Your shop Every Shopify, WooCommerce, PrestaShop or Magento order, turned into an invoice.
- 03 Your payments Mark invoices as paid when your payment gateway confirms the payment.
- 04 Your transport Services, deliveries and DeCA (electronic transport control documents) created from your order system.
- 05 Your assistant Ask Claude or ChatGPT how much you are owed or how the quarter's VAT is going.
89 operations,
organised by job.
Figures read from the published OpenAPI.
| Area | Resources | Operations |
|---|---|---|
| Sales | Collections · Invoices · Reports · Quotes and delivery notes | 26 |
| Contacts and catalogue | Customers · Catalogue | 10 |
| Purchases | Expenses and suppliers | 9 |
| Logistics | Logistics | 23 |
| Freight forwarding | Freight forwarding | 9 |
| Platform | System · API Keys · Webhooks | 12 |
Each operation has its own page in the reference, with schemas, examples and a panel to try it.
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 ↗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








