Go to file
lite 9c4f11d7c7 refactor: accept certificates as base64, remove external dependencies
- Replace file path with base64 content in register endpoint
- Use native Go pkcs12 for certificate validation and loading
- Remove PowerShell script dependency (validator.go)
- Remove Python script dependency (client.go)
- Remove hardcoded Windows paths
- Cross-platform: works on Linux, macOS, Windows without external tools
- Update documentation (api.md, seguridad.md, prerequisites.md)
2026-05-19 16:03:28 -04:00
.github/workflows fix(ci): fix packaging step for cross-compilation 2026-05-17 17:29:26 -04:00
api refactor: accept certificates as base64, remove external dependencies 2026-05-19 16:03:28 -04:00
documentacion refactor: accept certificates as base64, remove external dependencies 2026-05-19 16:03:28 -04:00
internal refactor: accept certificates as base64, remove external dependencies 2026-05-19 16:03:28 -04:00
test Update documentation and organize test files 2026-05-14 20:50:55 +02:00
verifactu refactor: accept certificates as base64, remove external dependencies 2026-05-19 16:03:28 -04:00
.gitignore base: project structure and configuration 2026-04-08 14:30:50 +02:00
AGENTS.md base: project structure and configuration 2026-04-08 14:30:50 +02:00
README.md docs: reorganize documentation and add prerequisites guide 2026-05-17 16:27:18 -04:00
config.yml Implement VeriFactu API with certificate management, invoice submission and local fallback 2026-04-17 13:03:06 +02:00
go.mod refactor: accept certificates as base64, remove external dependencies 2026-05-19 16:03:28 -04:00
go.sum refactor: accept certificates as base64, remove external dependencies 2026-05-19 16:03:28 -04:00
main.go feat: add format system with auto-detection 2026-05-17 16:27:27 -04:00

README.md

VeriFactu MidAPI

API intermediaria para enviar facturas a la AEAT a través del protocolo VeriFactu.

Recibe facturas en JSON, calcula el hash encadenado, genera el XML SOAP y lo envía a la AEAT. Si la AEAT no está disponible, guarda la factura localmente (fallback).


Documentación

Requisitos y setup Go, Python, OpenSSL, certificado, configuración
API Reference Endpoints, requests, responses
Protocolo VeriFactu Operaciones, hash, URLs AEAT, XML
Formato de datos NIF, fechas, tipos factura, IVA, ejemplo JSON
Formatos de entrada native, dolibarr, y cómo añadir nuevos
Arquitectura Capas, flujo de datos, cifrado
Seguridad Certificados, RSA, HTTPS
Certificados Obtener y configurar certificado FNMT
Tokens Sistema de autenticación por tokens
Configuración config.yml, variables de entorno
Testing Tests, depuración
Errores Códigos de error

Endpoints

Método Ruta Descripción
GET /api/v1/health Health check
GET /api/v1/auth/public-key Clave pública RSA
POST /api/v1/auth/register Registrar certificado .p12
GET /api/v1/formats Lista formatos disponibles
POST /api/v1/facturas Alta de factura (formato auto-detectado)
POST /api/v1/facturas/anular Anular factura

Estado

  • Alta de facturas con hash encadenado
  • Fallback local
  • Registro y validación de certificados
  • Anulación con AEAT
  • Consultas
  • Subsanación